24.8. Array.join( ): concatenate array elements to form a stringECMAScript v124.8.1. Synopsisarray.join( ) array.join(separator) 24.8.1.1. Arguments
24.8.1.2. ReturnsThe string that results from converting each element of array to a string and then concatenating them together, with the separator string between elements. 24.8.2. Descriptionjoin( ) converts each element of an array to a string and then concatenates those strings, inserting the specified separator string between the elements. It returns the resulting string. You can perform a conversion in the opposite directionsplitting a string into array elementswith the split( ) method of the String object. See String.split( ) for details. 24.8.3. Examplea = new Array(1, 2, 3, "testing"); s = a.join("+"); // s is the string "1+2+3+testing" 24.8.4. See AlsoString.split( ) |