how to make string from array in javascript code example
Example 1: js array to string
var myArray = ['no','u'];
var myString = myArray.toString();
Example 2: string to array javascript
const stringToSplit = '01-02-2020';
console.log(stringToSplit.split('-'));
const stringToSplit = '01-02-2020';
console.log(Array.from(stringToSplit));
Example 3: .join in javascript
const elements = ['Sun', 'Earth', 'Moon'];
console.log(elements.join());
console.log(elements.join(''));
console.log(elements.join('-'));
Example 4: array to string javascript
<array>.join(<splitting character(s)>);
Example 5: js array join
['h', 'e', 'y'].join('')