new line in alert javascript code example
Example 1: javascript alert box new line
alert("Line 1\nLine 2");
Example 2: javascript newline in alert
alert("Well I'm line 1 \nAnd I am a new line "); //new line in alert box
Example 3: new line in javascript alert
//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");