myString.concat( [ string1 ], [ string2 ], [ ... ] ) in ECMAScript 262

Append one or more strings to the current string, and return the result.


string1 String [optional] The first string to append.
string2 String [optional] The second string to append.
... String [optional] etc.
Return Type


The original string is not modified. If any parameters are not strings, toString() is called on them first. This is the same as origString+string1+string2+....

var myString = "Hello";
var fullMessage = myString.concat(' ','World. The secret number is ',17);
// ** fullMessage is "Hello World. The secret number is 17"
// ** myString is still "Hello"