xxxxxxxxxx
alert("welcom to javascript. \n Happy coding");
xxxxxxxxxx
alert("Text you want on first line. \n Text you want on next line");
//can use back-to-back "\n" to add additional spacing between lines
xxxxxxxxxx
//alert function is used to prompt alert box
//inside the quotes we write string to display
//use \n to enter new line
alert("John\nJames\nSteve");