Concept of Loop in Swift Looping :- Looping, also known iteration is used in a program to repeat a specific block/segment of code(s). This reduces the tasks of writing the same thing again and again. for condition increment loops:- The for-condition-increment loop is functionally the same as the 'for' loop in C. The loop consists of an initialization phase, a test, an increment, and a set of statements that are executed for every iteration of the loop. for initialization; condition; increment { statements } for in loops:- You use the for-in loop to iterate over sequences or collections of things, such as the elements of an array or dictionary, the characters in a string, or a range of numbers. Here's the general form is: for index in seque...
Comments
Post a Comment
If you have any douts, Please let me know