Returns a string value that contains the connection of two or more supplied strings.
string1.concat([string2[, string3[, . . . [, stringN]]]])
Parameters
String1
Required option. A string object or literal that is to be connected to all other specified strings.
string2,.. ., stringn
Options available. A String object or text to connect to the string1 tail.
Description
The results of the concat method are equal to: result = string1 + string2 + string3 + ... + stringn. The value in another string is unaffected regardless of whether the values in the source string or result string change. If there is a parameter that is not a string, it is converted to a string before being connected to string1 .
Example
The following example illustrates the use of the concat method when using strings:
function concatDemo(){var str1 = "ABCDEFGHIJKLM" var str2 = "NOPQRSTUVWXYZ";str1.concat(str2); returns a string that is well connected. return(s);}