Very simply, "add" two strings with a "+":
var longstring = "One Piece" + "plus one more piece.";
To accumulate more than one string as a string, you can also use the "+ =" Operator:
var result = "";
result = "My name was Anders" result + = "and I Age is
25";
To add a line break in a string, you need to use the escape character "":
var confirmstring = "You did don't enter a response to the" "+
" question. Submit form anyway? ";
var confirmvalue = confirm (confirmstring);
However, this method can only be used in cases such as warning, confirmation dialog box, if this text is rendered as HTML content, it is invalid, and then replace it with "<br>":
var htmlstring = "A. String.<br>second line of String.";
document.write (htmlstring);
The string object also provides a method concat () that completes the same function as "+":
String.Concat (value1, value2, ...)
But Concat () method is obviously not as "+" come intuitive simplicity.