Converting Arrays to Strings with Array.join() in Javascript


Convert the elements of an array into a string.

Source Code

let elements = ["Fire", "Air", "Water"];
let result = elements.join(", ");
console.log(result); // "Fire, Air, Water"
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments