prompt new line javascript code example Example: javascript newline in alert alert("Well I'm line 1 \nAnd I am a new line "); //new line in alert box