concatenate array items to a string in javascript code example
Example 1: javascript join list of string
// array.join(separator)
var myArray ['foo', 'bar', 'baz'];
myarray.join(':');
// foo:bar:baz
Example 2: join in array
var a = ['Wind', 'Water', 'Fire'];
a.join(); // 'Wind,Water,Fire'
a.join(', '); // 'Wind, Water, Fire'
a.join(' + '); // 'Wind + Water + Fire'
a.join(''); // 'WindWaterFire'