0
Hello, would someone kindly explain why this code doesn't display anything?
var x = 0; while(x<10){ document.write(x + "<br>"); x+2; }
3 odpowiedzi
+ 5
You should do increment so you need to write x=x+2 rather then x+2
Ok
+ 2
It should x+=2 not x+2
+ 1
learn about operators. assignment, arihmetic, logical relational. what youve written is an arihmetic operator, while you want an assignment operator.