JavaScript Arrays - join() method Tutorial

The join() method is used to join all the elements of an array into a single string separator, displayed as an alert.


Code Example
  1. var chevCar = new Array("Nova","Impala","Corvette");
  2. var chevCar2 = chevCar.join(" ");
  3. alert("The array chevCar contains " + chevCar2);