<header> <h1>NewLine</h1> </header> <body> <script> const toMultiLine = (str) => str.split("\\n").join("\n"); alert(toMultiLine(prompt("Enter multiline string with '\\n' as new line."))); </script> </body>