title: using .join method to convert array to string without commas
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2125779/array-join-method-with-a-separator">array join() method without a separator</a>  </p>
  </blockquote>
  
  
  
  <p>I'm using <code>.join()</code> to convert my array to a string so I can output it in a text box as the user selects numbers in a calculator, I'm not entirely sure how I can remove the commas that are also being output in the list however. Can someone advise how this can be achieved or if there is a different approach I should be using? </p>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$(document).ready(function() {
      var total = 0;
      var arr = [];
  
      //Testing
      $('#calculator').children('.num').on('click', function(e) {
          var clickedNumber = $(this).data('id');
          arr.push(clickedNumber);
          console.log(arr.join());
          e.preventDefault();
      });
  });​
  </code></pre>
  
  <p>JS Fiddle <a href="http://jsfiddle.net/CVr25/" rel="noreferrer">http://jsfiddle.net/CVr25/</a></p>