concat Method (String)

Microsoft Office JScript

Microsoft® JScript® concat Method (String)  Language Reference 
Version 3 

See Also                  Applies To


Description
Returns a String object containing the concatenation of two supplied strings.
Syntax
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.

Remarks
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);
}