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


string1, string2, ... string_nThese 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

JavaScript Concatenate Strings es6| String concat() Method
1.60 GEEK