Returns a string that contains the concatenation of two or more strings.
Required. The String object or string literal to which all other specified strings are concatenated.
- string2,. . ., stringN
Optional. The strings to append to the end of string1.
The result of the concat method is equivalent to: result = string1 + string2 + string3 + stringN. A change of value in either a source or result string does not affect the value in the other string. If any of the arguments are not strings, they are first converted to strings before being concatenated to string1.
The following example illustrates the use of the concat method when used with a string:
Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards, Internet Explorer 11 standards. Also supported in Store apps (Windows 8 and Windows Phone 8.1). See Version Information.