title: javascript for loop produces error in output
body: <p>The below for loop produces an error in the html output, I substituted with other function and the html output was fine, so I'm convinced its this function. I also recreated it in an ide substituting $("#car").html(year); for console.log(year); and it produced the correct output. What is the problem with this function?</p>
  
  <pre><code>function cgr() {
  for (var year = 0; (churn * total_customer) &lt; leadcon; year++) {
      total_customer = total_customer + leadcon;
       if ((churn * total_customer) &gt;= leadcon) {
              $("#car").html(year);
          }else {
      $("#car").html("something is wrong");
      };
  }
  </code></pre>
  
  <p>}</p>
  
  <p>full script can be found here: <a href="http://pastebin.com/DcDKNfux" rel="nofollow">http://pastebin.com/DcDKNfux</a></p>