How to join array element together
Description
The join()
method accepts the string separator as
the only argument and returns a string containing all items.
Example
var colors = ["red", "green", "blue"];
console.log(colors.join(",")); //red,green,blue
console.log(colors.join("||")); //red||green||blue
The code above generates the following result.