Answers for "javascript add new line in string"

0

javascript add new line in string

//use \n like this:
var newString = "this is on line 1 \nand this is on line 2";
console.log(newString);
Posted by: Guest on September-02-2021

Code answers related to "javascript add new line in string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language