Is there a simpler way to understand while loops? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is there a simpler way to understand while loops?

12th Oct 2017, 2:02 AM
Alex Eyram Azasoo
Alex Eyram Azasoo - avatar
3 Answers
+ 1
while loop is a control statement: that says provided the conditions u set are true do certain instructions. eg var a =2; while (a<19){ document.write(a); a++;} this will output the current value of a as far a is less than 19 if a becomes 19 it won't work.
12th Oct 2017, 11:19 AM
Aaron Victor
Aaron Victor - avatar
+ 1
Thanks a lot
15th Oct 2017, 10:05 PM
Alex Eyram Azasoo
Alex Eyram Azasoo - avatar
0
you are welcome
16th Oct 2017, 9:05 AM
Aaron Victor
Aaron Victor - avatar