title: JavaScript print array to string with brackets and quotes
body: <pre><code>var fruits = ["Banana", "Orange", "Apple", "Mango"];
  </code></pre>
  
  <p>If I had the above array and wanted to output it to the user in the DOM as <code>["Banana", "Orange", "Apple", "Mango"]</code></p>
  
  <p>What would be the best way to do this?</p>
  
  <p>I have tried <code>fruits.toString();</code> which outputs as <code>Banana,Orange,Apple,Mango</code></p>