How to turn an array into a string in JavaScript?

To turn an array into a string in JavaScript, call: array.join().

Here's how you do it:

const array = [ 1, 2, 3 ];

const string = array.join();

// 1,2,3
console.log(string);