The concat()
method is used to join two or more strings to form a new string. This is done by joining one or more strings to the calling string. This method returns a new string containing the text of the joined strings without changing the existing strings. It was introduced in ECMAScript 1.
string.concat(string1, string2, ... string_n);
Parameters
string1, string2, ... string_n
These are the values to join to the end of the calling string.
The concat() method returns a new string that results from concatenating the original string with the string values that were passed in as parameters.
#code examples #javascript #concatenate strings #programming