how to start new line in a for loop in javascript code example
Example 1: new line in js
document.write("\n");
//second method for html page
document.write("<br>");
Example 2: javascript for loop new line when getting to the end of screen
for (i = 0; i <= 10; i++) {
document.getElementById("my-paragraph").innerHTML = "Hello World\n";
}