xxxxxxxxxx
<script>
document.write("Have a nice day!");
document.write("<br>");
document.write("Thank You.");
//OR
document.write("Have a nice day! <br>Thank You.");
//OR
document.write("Have a nice day! <br>");
document.write("Thank You.");
//OR
document.writeln("Hello World!");
document.writeln("Have a nice day!");
</script>
xxxxxxxxxx
// Using \n to insert a new line
var message = "This is the first line.\nThis is the second line.";
// Logging the message to the console
console.log(message);
xxxxxxxxxx
document.write("<br>"+ n1)// here n1 is variable and the value of n1 print in next line