array to string javascript

JavaScript
const arr = [1, 2, 'a', '1a'];
const str = arr.toString();
console.log(str); //> "1,2,a,1a"var myArray = ['no','u'];
var myString = myArray.toString();arr.join()
arr.join(séparateur)

let monTableau = ['un', 'deux','trois', 'quatre'] ;
console.log(monTableau.join('/ ')) ;

/////////////////or//////////////////////

let monTableau2D = [
     ['Mark' , 'jeff' , 'Bill'] , 
     ['Zuckerberg' , 'Bezos' , 'Gates']
 ] ;
 
 console.log(monTableau2D[0].join(', '))
            // or 
 console.log(monTableau2D.join('/ '))

var array = [1,2,3]

for(var i = 0; i < array.length ; i++){
    console.log(array[i])
}var fruits = ["Banana", "Orange", "Apple", "Mango"];
var x = fruits.toString();<array>.join(<splitting character(s)>);
Source

Also in JavaScript: