line break in javascript string code example
Example 1: javascript line break
var linebreak = '\n';
Example 2: new line in js
document.write("\n");
document.write("<br>");
Example 3: new line with javascript write
res.write("\n");
Example 4: line break in js
<html>
<body>
<script>
<!--
document.write("Hello World!");
document.write("<br>");
document.write("Demo<br><br>Text!");
</script>
</body>
</html>
Example 5: javascript string return character
var str = "HELLO WORLD";
var res = str.charAt(0);