how to do innerhtml with line breaks code example
Example 1: add line break in innerhtml
document.getElementById("demo").innerHTML += "hello";
document.getElementById("demo").innerHTML += "<br>";
Example 2: add line break in innerhtml
document.getElementById("demo").innerHTML += "hello";
document.getElementById("demo").innerHTML += linebreakhere;