js array to string
// Defining an array with most datatypes ( objects have to be converted to string with JSON.stringify(obj) )
var myArray = ['String',"String",1,2.5, false, NaN, undefined];
// Convert the array into a string using the JS function toString();
var myString = myArray.toString();
// Logging it on the console
console.log(myString) // "String,String,1,2.5,false,NaN," (undefined values cannot be converted to strings)