Microsoft® JScript® concat Method (String) |
Language Reference Version 3 |
Returns a String object containing the concatenation of two supplied strings.
string1.concat(string2)
The concat method syntax has these parts:
Part Description string1 Required. The String object or literal to concatenate with string2. string2 Required. A String object or literal to concatenate to the end of string1.
The result of the concat method is equivalent to: result = string1 + string2.The following example illustrates the use of the concat method:
function concatDemo() { var str1 = "ABCDEFGHIJKLM" var str2 = "NOPQRSTUVWXYZ"; var s = str1.concat(str2); // Return concatenated string. return(s); }