title: Formatting a setInterval() Timer with thousands separators
body: <p>Newbie here, and I've been playing around with this setInterval() count up timer, and my goal here is to get the counter to display thousands (,) separators while counting up. Is there an easy way to do this, or would it require a difficult solution? I've tried to play around with toLocaleString, but to no avail. Here's my code so far.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p id="test"&gt;0&lt;/p&gt;
  &lt;button id="button" onclick="b().toLocaleString('en-US')"&gt;Start&lt;/button&gt;
  &lt;script&gt;
      var c = 0;
      function a() { 
          document.getElementById("test").innerHTML = ++c;
      }
  function b() {
  setInterval(a, 5);
  }
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>