I am trying to learn basic javascript and using jsfiddle as my tool of choice to play around with code. I’ve found I really learn through working examples I can see output for.
However, I find when I do something along the lines of the following, both lines are displayed on the same line:
document.writeln("This is Line One");
document.writeln("This is Line Two");
i.e. http://jsfiddle.net/u1sonderzug/NVSsy/
I understand as a beginner I might be going about doing this in the completely wrong way, so I’d like to understand best practices.
In html,
<br>is for new lines.