+ 3
Issues with for loop!
The excersize says this should provide and even increasement from 0 to 20, the variable goes: var x=20 for (;x <= 20; x += 2 ) { document.write(x) } my question is what is the point of two, it only treat my answer as right when I put 2, why can't it be one for example, it makes more sense?
3 Answers
+ 5
oooh I see, we don't call them even numbers in my native lanugage so I didn't realise they are called even, they call them "devidable numbers" in my language, thank you so much!!
+ 2
Incrementing by 1 (Ă += 1) will print all numbers. Incrementing by 2 (Ă += 2) will print only the even numbers.
+ 1
uhhh if we want an increment from 0 to 20 then we should start with var x = 0; ?