Bird
0
0

Which of the following is the correct syntax to skip the current iteration in a Swift for loop?

easy📝 Syntax Q12 of 15
Swift - Loops
Which of the following is the correct syntax to skip the current iteration in a Swift for loop?
Askip
Bcontinue
Cbreak
Dstop
Step-by-Step Solution
Solution:
  1. Step 1: Identify the keyword to skip iteration

    In Swift, continue is used to skip the rest of the current loop iteration and move to the next one.
  2. Step 2: Verify other options

    break stops the loop, skip and stop are not valid Swift keywords for loops.
  3. Final Answer:

    continue -> Option B
  4. Quick Check:

    Skip iteration = continue [OK]
Quick Trick: Use continue to skip current loop step [OK]
Common Mistakes:
  • Using break instead of continue
  • Using non-existent keywords like skip or stop
  • Confusing continue with break

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Swift Quizzes