+ 2
How to fix my javascript command?
All works good but my var is the problem.. why does javascript don't accept it how i wrote it? i just need answers to my var x=x; ... document.write(x); https://code.sololearn.com/WzwydtdroxPF/?ref=app
4 RĂ©ponses
+ 3
I ran your code from the link above and there were a couple of errors present. First of all at the beginning of your for loop, you did not declare i a variable. Corrected code is below and it works now.
Current State:
for ( i=1; i<=100; i++) {
document.write(i + "<br />";
}
Corrected Code:
for (var i = 1; i <=100; i++) {
document.write(i + "<br />");
}
+ 2
omg that rookie bad from me :(
thank you so much !
+ 2
ok thank you