Hello. This time I have a rather simple question, rather a clarification.
Arrays > Converting between strings and arrays:
let myNewString = myArray.join(',');
myNewString;
const elements = ['Fire', 'Air', 'Water'];
console.log(elements.join());
// expected output: "Fire,Air,Water"
Check:
const elements = ['Fire', 'Air', 'Water'];
console.log(elements.join(','));
Fire,Air,Water
Do I understand correctly that there is no need for a comma in .join () if you want to separate the array with only commas?
which is better?