title: Javascript returns [object HTMLSpanElement]
body: <p>I'm making a simple game for selling anchovies. I have an upgrade to buy a small fishing net. The fishing net costs a certain amount of anchovies, so I subtract that number from the total and then rewrite using innerHTML. I want this small net to add 1 anchovy every second, so I use window.setInterval. However, now every second [object HTMLSpanElement] is written to the page. </p>
  
  <p>What do I do?</p>
  
  <p>Here is the jsfiddle link: <a href="http://jsfiddle.net/Bj6M5/1/" rel="nofollow">http://jsfiddle.net/Bj6M5/1/</a></p>
  
  <p>And here is the code:</p>
  
  <p>
  </p>
  
  <pre><code>&lt;head&gt;
  &lt;script type="text/javascript"&gt;
  var anchovies = 0;
  var money = 0;
  
  function goFish(num) {
      anchovies = anchovies + num;
      money = 0.433 * anchovies;
      var money_rounded;
      money_rounded = money.toFixed(2);
      if (anchovies != 1) {
          document.getElementById("anchovies").innerHTML = anchovies + " anchovies";
      }
  
      else {
          document.getElementById("anchovies").innerHTML = "1 anchovy";
      }
      document.title = "$" + money_rounded + " - Anchovy Bros.";
  }
  
  function buySmallNet(){
  var smallnet_price = Math.floor(10 * Math.pow(1.1,smallnets));     
      if (anchovies &gt;= smallnet_price) {                                   
          smallnets = smallnets + 1;                                   
          anchovies = anchovies - smallnet_price; 
          if (smallnets != 1) {                       
              document.getElementById("smallnets").innerHTML = smallnets + " small nets";
          }
          else {
              document.getElementById("smallnets").innerHTML = "1 small net";
          }  
          document.getElementById("anchovies").innerHTML = anchovies + " anchovies";  
      }
  
      else {
          alert("You don't have enough anchovies!");
      }
  }
  
  window.setInterval(function(){
      goFish(smallnets);
  }, 1000);
  &lt;/script&gt;
      &lt;title&gt;$0 - Anchovy Bros.&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;button onclick="goFish(1);"&gt;FISH!&lt;/button&gt;
  &lt;br&gt;
  &lt;span id="anchovies"&gt;&lt;/span&gt;
  
  &lt;div style="float:right;" id="upgrades"&gt;
      &lt;center&gt;
      &lt;button onclick="buySmallNet();"&gt;small fishing net&lt;/button&gt;
      &lt;br&gt;
      &lt;span&gt;costs 15 anchovies&lt;/span&gt;
      &lt;br&gt;
      &lt;span id="smallnets"&gt;&lt;/span&gt;
      &lt;/center&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>