+ 1

how come the other var text is looped? for (i=1, text=""; i <=8; i++) { text=hello; document.write(i+text+"<br/>"); }

26th Sep 2016, 3:22 PM
Abdoulaye Seck
Abdoulaye Seck - avatar
2 Réponses
+ 6
There are some mistakes in the code. it should be like this: for (i=1, text=""; i <=8; i++) { text="hello"; document.write(i+text+"<br/>"); } to print 1hello 2hello 3hello : 8hello
26th Sep 2016, 6:28 PM
Mohammed Chetehouna
+ 3
yes you right
26th Sep 2016, 6:44 PM
Abdoulaye Seck
Abdoulaye Seck - avatar