Javascript [Electronic resources] : The Definitive Guide (4th Edition)

David Flanagan

نسخه متنی -صفحه : 844/ 344
نمايش فراداده

Availability

JavaScript 1.2; JScript 3.0; ECMAScript v3

Synopsis

string.concat(value, ...)

Arguments

value, ...

One or more values to be concatenated to string.

Returns

A new string that results from concatenating each of the arguments to string.

Description

concat( ) converts each of its arguments to a string (if necessary) and appends them, in order, to the end of string. It returns the resulting concatenation. Note that string itself is not modified.

String.concat( ) is an analog to Array.concat( ). Note that it is often easier to use the + operator to perform string concatenation.

See Also

Array.concat( )