The strength of JavaScript arrays lies in the array methods. The JavaScript method toString() converts an array to a string of (comma separated) array values.
HTML file:
Displayed by browser:
<body>
<h4>The toString() method returns an array as a comma separated string:</h4>
<p id="demo"></p>