String.prototype.concat() Method in String Class of Javascript Syntax with Examples
2433 Views
Usage
concat() function used to connect two strings or more than two strings.
Syntax
string1.concat(string2,string3,....)
Example
var firstName = "Steve";
var lastName = "smith";
//connect the firstName with lastName
var char1 = firstName.concat(lastName);
document.write("The string is"+char1+".");