convert array object to string javascript

JavaScript
var obj = {a: "a", b: "b" /*...*/};
var string = JSON.stringify(obj);
// OUTPUT:
// "{'a':'a', 'b':'b'}"var jsonArray = JSON.parse(JSON.stringify(pluginArrayArg))var ar = ['a', 'b', 'c', 'd', 'e', 'f', 'g']; 
console.log( ar.join('') ); // abcdefg
console.log( ar.join(' : ') ); // a : b : c : d : e : f : g
console.log( ar.join('-') ); // a-b-c-d-e-f-g
console.log( ar.join('|') ); // a|b|c|d|e|f|g

Source

Also in JavaScript: