join()
Creates a string from array elements
let words = ["Hello", "beautiful", "world"];
// Default separator is comma
let commaString = words.join();
console.log(commaString); // "Hello,beautiful,world"
// Custom separator
let sentence = words.join(" ");
console.log(sentence); // "Hello beautiful world"
let dashString = words.join("-");
console.log(dashString); // "Hello-beautiful-world"