0
How make a loop return even numbers?
Hello guys, I'm trying to make this loop return even numbers but it's giving me an error message on line 1 for (i=2; i<=10; i++2) { document.write(i + "<br />"); }
3 Antworten
+ 3
you are writing i++2 change it to i=i+2 or I+=2
0
Thanks..
0
i++ equals to i=i+1 so you can't use this shortcut in this case