Answers for "javascript line break"

7

new line in js

document.write("\n");
//second method for html page
document.write("<br>");
Posted by: Guest on April-28-2020
8

javascript line break

//in JavaScript, you can declare a line break (or new line)
//with the \n character.
var linebreak = '\n';
Posted by: Guest on March-26-2020
0

replace line break with html line break js

let multilineString = `My
text\r1\r\n2\n3\n\r4
is
here`;

let htmlText = multilineString.replace(/(\r\n|\n\r|\r|\n)/g, '<br>');

console.log('Multiline string: ' + multilineString);
console.log('HTML text: ' + htmlText);
Posted by: Guest on December-04-2020
1

new line javascript

console.log('Hello \n World');
Posted by: Guest on April-02-2020
0

new line with javascript write

res.write("\n");
Posted by: Guest on June-17-2020
0

line break in js

var linebreak = '\n';
Posted by: Guest on June-09-2021

Code answers related to "javascript line break"

Code answers related to "Javascript"

Browse Popular Code Answers by Language