Swift For Loop Konditionen nach bestimmtem „cycle“?
(Vorweg ich bin keine Profi also entschuldigt falls der title einwenig komisch formuliert ist)
Ich möchte folgendes in Swift machen (pseudo code):
for x in 1 … 10 {
doStuff()
// ab dem 4 „cycle“ soll ein conditional statement „dazukommem“
for x in 4 … 10 {
if something = true {
doMoreStuff()
}
}
}
Ich hoffe das ganze ist nicht zu umständlich erklärt :)
Danke im voraus.