+ 1

What is the difference between while and for loop? are they both same with different syntax?

1st Mar 2017, 5:12 AM
Remix Sm
Remix Sm - avatar
1 Réponse
+ 3
They are not the same, the for loop uses a "static" number of times to be repeated, I mean it is used when you know how many times you need to repeat your code... The while loop could be repeated uncertainty number of times
1st Mar 2017, 5:28 AM
Alejandro Serrato
Alejandro Serrato - avatar