0
What are differences
Means:'for loop' and 'while loop'
3 odpowiedzi
+ 4
I read an article that described 'for' loops as best used when you have a known number of itetations to achieve a result.
'While' loop is best used when you have an unknown number of iterations to achieve a result.
An example of using 'while' is when prompting user input to 'Guess a Number'.
The code will keep prompting input until the number is achieved
0
Thank you