+ 1
What is the difference between while and for loop? are they both same with different syntax?
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