0

When i+ is used in document.write( i+), is it necessary to write i++ in next line

document.write(i+ <br\>); i++

4th Apr 2018, 2:22 PM
Piyush Kumar
Piyush Kumar - avatar
3 Answers
+ 3
The i + "<br />" in your sample there is used to concatenate the value of i with a line break ("<br/>") which is used to tell the browser to write the value of i, and advance to the next row for printing next value, so I guess the i++; line is necessary if you wish to see the value of i to increment in every line. Hth, cmiiw
4th Apr 2018, 3:05 PM
Ipang
+ 3
Hehehe, well it happens, you're welcome...
4th Apr 2018, 3:14 PM
Ipang
0
oh shit! I got confused with single +. thanks
4th Apr 2018, 3:09 PM
Piyush Kumar
Piyush Kumar - avatar