The above command will print Hello World in the web browser. Full code is here
We can add line break before this by using document.writeln. We can also add a line break like above example where ever required.
document.write(my_var + "<br>"+my_var1 )
document.writeln() will add one line break after the statement. However while displaying, HTML will remove all white space and keep one single space, so new line will not be displayed. To get line break we will keep our code inside <pre> tag.