How do we write when a drill questions is not valid? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

How do we write when a drill questions is not valid?

Example: for(var = 1; i < 5; i++) { } document.write(i); How do we write that it is an error when doing the challenges? I tried tk get an answer from the Chrome Console and it reads me back syntaxerror...

2nd Jan 2017, 7:53 AM
Josecarlos Azua
Josecarlos Azua - avatar
1 Réponse
+ 4
This code's not working because the variable name is missing in the declaration/assignation part of the "for" parenthesis... but you can easily see that's normaly "var i=1;", and so you'll be blocked if only you execute the code for finding the response, else you can guess what the code do without seing the bug ;)
2nd Jan 2017, 10:10 AM
visph
visph - avatar