A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/String/concat below:

concat ยท WebPlatform Docs

concat Summary

Returns a string that contains the concatenation of two or more strings.

Syntax
string1. concat([ string2 [, string3 [, . . . [, stringN ]]]])
string1
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.
Examples

The following example illustrates the use of the concat method when used with a string:

var str1 = "ABCD"
 var str2 = "EFGH";
 var str3 = "1234";
 var str4 = "5678";
 document.write(str1.concat(str2, str3, str4));

 
Remarks

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.

See also Other articles Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4