title: Creating a counter
body: <p>I'm creating a counter and I'm having a hard time making it.
  The goal of the counter is that for ever second passed a number will increase by 170. 
  As you can see below the number does not add up and is made on a new line, mostly because I dont know how to make it add up.  Some thing like this clock from <a href="http://www.economist.com/content/global_debt_clock" rel="nofollow">The Economist</a></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;p&gt;Click the button see how much AirHelps market increases by every second.&lt;/p&gt;
  
  &lt;button onclick="counterFunction()"&gt;See it now&lt;/button&gt;
  
  &lt;p id="counter"&gt;&lt;/p&gt;
  
  &lt;script&gt;
  function counterFunction() {
  setTimeout(function () {
      var text = "";
      var i = 170;
      while (i &lt; 3500) {
          text += "&lt;br&gt;The number is " + i;
          i+=170;
      }, 1000) }
  
  document.getElementById("counter").innerHTML = text;
  }
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any ideas on how I can make this and what is wrong with my code? </p>