0

Pls I don't know the use of the text="" in the code

for (i=1, text=""; i<=5; i++) { text = i; document.write(i + "<br />"); }

9th Aug 2018, 4:35 PM
FRANCIS JEREMIAH
3 Answers
+ 1
This is just an initial condition. It is initializing test variable with blank value like i with value equal to 1. Hope this helpsâ˜șâ˜ș.
9th Aug 2018, 5:16 PM
Meet Mehta
Meet Mehta - avatar
+ 1
You can have as many initial condition as you want in for loop. But remember to separate them using comma's.
9th Aug 2018, 5:19 PM
Meet Mehta
Meet Mehta - avatar
0
Thanks for the answer
9th Aug 2018, 9:28 PM
FRANCIS JEREMIAH