+ 1
Am I wrong ? Or JavaScript challenge question is wrong
I found this code on JavaScript challenge : for (var x = 0; x == x; x++) { if(x > 5 && x < 8){ document.write(x); break; } } and the answer is 6. but I try the code in playground, the result is nothing. Am I wrong ? https://code.sololearn.com/W9J9SnYJWLD5/?ref=app
6 Antworten
+ 6
Change the function name. Some keywords like "write" doesn't work as function names in JavaScript.
+ 1
it was meant to be document.print I think
+ 1
have you tried with netbeans?hope it will work
0
ok.. thanks.. i'd changed the function name, it's work.. so i was wrong because of that function name.. I think I missed the lesson..
0
it can be @Vincent
0
not yet.. @Samuel