how to convert array into string in js code example
Example 1: js array to string
var myArray = ['no','u'];
var myString = myArray.toString();
Example 2: javascript convert in a string the items of an array
const arr = [1, 2, 'a', '1a'];
const str = arr.toString();
console.log(str);
Example 3: array to string javascript
var cars = ["Volvo", "BMW", "Audi", "Chevrolet"];
console.log(cars.toString());
Example 4: array to string javascript
<array>.join(<splitting character(s)>);
Example 5: turn array into string
const elements = ['Fire', 'Air', 'Water'];
console.log(elements.join());
console.log(elements.join(''));
console.log(elements.join('-'));