Forums
Learn
Careers
Store
About
SUBSCRIBE
BLACK FRIDAY: Save 50% on all my Swift books and bundles! >>
Question 1/12: This loop will never end – true or false?
Hint: Infinite loops are commonly made using while true but other conditions can also work. Click to show.
while true
var kids = 1 repeat { print("Kids in the class: \(kids)") kids += 1 } while kids != 10
Correct! When kids reaches 10 this loop will terminate.
kids
Oops – that's not correct. When kids reaches 10 this loop will terminate.
Return to Review Menu
You are not logged in
Link copied to your pasteboard.