Concatenate Array Method

The Concatenate Array method concatenates all the elements of an array into a string. It returns a concatenated string that includes individual array element values that are separated by commas. It does not include any input arguments.

Format

concat()
toLocaleString()

The toLocaleString statement works just like the concat statement but it converts the string to another language according to the locale setting.

Example

The following example includes the Concatenate Array method:

var v = new Array;
v[0] = 7;
v[1] = 3;
v.concat();   // The result would be "7,3"