javascript implode array into string code example
Example 1: .join javascript
const elements = ['Fire', 'Air', 'Water'];
console.log(elements.join());
// expected output: "Fire,Air,Water"
console.log(elements.join(''));
// expected output: "FireAirWater"
console.log(elements.join('-'));
// expected output: "Fire-Air-Water"
Example 2: can you do a join() in js without the commas
arr.join("")
Example 3: joining array of string
Array.join()