+ 3

Explanation

for (i=1, text=""; i<=5; i++) { text = i; document.write(i + "<br />"); } In the code above, what is the essence of text in the first statement? Also what does "<br />" stand for there?

13th Sep 2017, 12:16 AM
Racheal Inyang Emmanuela
3 Réponses
+ 6
<br /> is for a new line, jump line
13th Sep 2017, 12:46 AM
Daniel
Daniel - avatar
+ 4
the text variable is best removed
13th Sep 2017, 4:03 AM
Eric Blinkidu
Eric Blinkidu - avatar
+ 1
@eric blinkidu why?
13th Sep 2017, 11:29 AM
Racheal Inyang Emmanuela