Microsoft® JScript®
join Method
 Language Reference 
Version 2 

See Also                  Applies To

Returns a String object consisting of all the elements of an array concatenated together.


The separator argument is a String object that is used to separate one element of an array from the next in the resulting String object. If omitted, the array elements are separated with an empty string.

The join method returns a String object that contains each element converted to a string and concatenated together.

The following example illustrates the use of the join method:

function JoinDemo()
  var a, b;
  a = new Array(0,1,2,3,4);
  b = a.join("-");