join
The join() method creates and returns a new string by concatenating all of the elements in an array, separated by commas or a specified separator string. If the array has only one item, then that item will be returned without using the separator.
var names = ['Shane', 'Alan', 'Aadam'];
console.log(names.join()); // 'Shane,Alan,Aadam'
console.log(names.join('-')); // 'Shane-Alan-Aadam'