const numbersArray = [1, 2, 3, 4, 5, 6, 7];
const numbersString = numbersArray.join(" ");
console.log(numbersString);
const array = [0, 1, 2, 3, 4, 5];
/*
Array.prototype.join(separator);
Converts each element of the array into a string
and joins each element into one long string with
each element separated by the separator.
*/
const string1 = array.join("");
console.log(string1); // -> 012345
const string2 = array.join(",");
console.log(string2); // -> 0,1,2,3,4,5
const string3 = array.join(", ");
console.log(string3); // -> 0, 1, 2, 3, 4, 5