Created On: 02/10/2021
The below code explains how to do the conversion.
var words = ['this', 'is','business'];var str = words.toString();console.log(str);// Output:// > this,is,business
So, the output of this code will be a string containing all the objects as comma-separated.
To use any other delimiter than a comma, we can use the
join() method like below.
var words = ['this', 'is','business'];var str = words.join(" ");// Output:console.log(str);// > this is business
toString() method doesn't accept any parameter to use as a delimiter. But the
join() method has this feature. So we can use
to create more formatted strings from an array.