array to a string javascript code example
Example 1: js array to string
var myArray = ['no','u'];
var myString = myArray.toString();
Example 2: .join in javascript
const elements = ['Sun', 'Earth', 'Moon'];
console.log(elements.join());
// output: "Sun,Earth,Moon"
console.log(elements.join(''));
// output: "SunEarthMoon"
console.log(elements.join('-'));
// output: "Sun-Earth-Moon"
Example 3: array to string javascript
<array>.join(<splitting character(s)>);