What is a while loop in Swift?

Swift while loop is used to run a specific code until a certain condition is met . The syntax of while loop is: while (condition){ // body of loop } Here, A while loop evaluates condition inside the parenthesis () . If condition evaluates to true , the code inside the while loop is executed.

Sizin İçin Seçtik  What type of programming language is Swift?

Leave a Reply

Your email address will not be published. Required fields are marked *