hw08_05_!NewLine.html 247 B

123456789101112
  1. <header>
  2. <h1>NewLine</h1>
  3. </header>
  4. <body>
  5. <script>
  6. const toMultiLine = (str) =>
  7. str.split("\\n").join("\n");
  8. alert(toMultiLine(prompt("Enter multiline string with '\\n' as new line.")));
  9. </script>
  10. </body>