Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

join Method 

Returns a string value consisting of all the elements of an array concatenated together and separated by the specified separator character.

function join(separator : String) : String


Required. A string 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 a comma.

If any element of the array is undefined or null, it is treated as an empty string.

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("-");

Community Additions

© 2015 Microsoft