While loop javascript? | Sololearn: Learn to code for FREE!


While loop javascript?

I understand how to write the code but what can while loop and for loop actually be used for in web development?

6/12/2018 3:41:15 AM


2 Answers

New Answer


for loops are mostly for cycling through array items


Here a article on MDN web docs to help you get what's the importance of the loops. https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Looping_code