title: Object has no method 'replace'
body: <p>I'm try to run this function, which grabs all the checked checkbox values in to a comma separated string, and converts <code>","</code> in to <code>", "</code>, so it reads better. The problem is I'm getting a strange error:</p>
  
  <pre><code>$('.name_boxes').live('click', function() {
      var all_boxes = $('.name_boxes');
      var all_boxes_values = []
      for (var i = 0; i &lt; all_boxes.length; i++) {
          if (all_boxes[i].checked) {
              all_boxes_values.push(all_boxes[i].value)
          }
      }
      var all_boxes_values_clean = all_boxes_values.replace(/,/g,", ");
      alert(all_boxes_values_clean);
  });
  </code></pre>
  
  <p>The console error says:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Object Aaron Ramsey,Aaron Renfree has no method 'replace'.</p>
  </blockquote>
  
  <p>I'm not getting the alert box.</p>
  
  <p>This is a bit beyond me, can anybody explain what I'm doing wrong?</p>