+ 1
I can't figure out why the code will not work? How do you put two or more commands in a while loop for Javascript?
6 Answers
+ 3
you do y+1 in document.write, but that doesn't change y.
To increase y, you could do:
y = y+1;
Or
y++;
After document.write
+ 2
And remove the break tag in the loop ā it gives an error
+ 1
You need to increase y on each iteration so that y < x will eventually become false
+ 1
Lisa thanks I forgot that <br> in Javascript thx
+ 1
Lisa thank you, that has very helpful