The strength of JavaScript arrays lies in the array methods.
Converting Arrays to Strings
In JavaScript, all objects have the valueOf() and toString() methods.
The valueOf() method is the default behavior for an array. It returns an array as a string:
Example