+ 2

For loop VS While loop

what is the difference between for loop and while loop in Javascript ?

13th Jan 2021, 7:16 AM
Vijayanathan Menakan
Vijayanathan Menakan - avatar
5 Answers
+ 6
https://www.sololearn.com/learning/1140/ Review lessons 18 & 19 of the Sololearn Javascript tutorial.
13th Jan 2021, 7:25 AM
Elizabeth Kelly
Elizabeth Kelly - avatar
13th Jan 2021, 7:27 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 3
Kindly use the Search bar
13th Jan 2021, 7:27 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 2
The 'for' loop used only when we already knew the number of iterations. The 'while' loop used only when the number of iteration are not exactly known
13th Jan 2021, 12:19 PM
Luxshan Thuraisingam
Luxshan Thuraisingam - avatar