+ 2
java print out
hey guys, I was just paying with some codes and I realized if I don't use the "+" sign after I in princesses in the "document.write" it will show me an error!! what is the purpose of that plus sign? the code is: var i = 0; for (; i <= 10; ) { document.write(i+ "<br />"); i++; }
2 Answers
+ 6
As i is a number and <br /> is a html tag, + sign is needed to *join* them together.
Even if the former would be a string, then also we had used + as both are two unique elements!
+ 3
thank you blue for your awesome explanation đ