Nova linha em JS
document.write("\n");
//second method for html page
document.write("<br>");
JavascriptNinja
document.write("\n");
//second method for html page
document.write("<br>");
//in JavaScript, you can declare a line break (or new line)
//with the \n character.
var linebreak = '\n';
let multilineString = `My
text\r1\r\n2\n3\n\r4
is
here`;
let htmlText = multilineString.replace(/(\r\n|\n\r|\r|\n)/g, '<br>');
console.log('Multiline string: ' + multilineString);
console.log('HTML text: ' + htmlText);
console.log('Hello \n World');
<html>
<body>
<script>
<!--
document.write("Hello World!");
document.write("<br>");
document.write("Demo<br><br>Text!");
//-->
</script>
</body>
</html>
var linebreak = '\n';