JS: Array.prototype.toString
arrayX.toString()
-
Return a string representation of arrayX.
[3, 4].toString() === "3,4" // note: no bracket in result
[[1, [2]], 5].toString() === "1,2,5" // note: no bracket in result, even for nested array
[3, { k: 4 }].toString() === "3,[object Object]"