title: for loop causing "Unexpected token" error
body: <p>I'm trying to pick up javascript, and I'm writing a fairly simple script where a user gives a number of pennies and a number of days. The script will then calculate how much money the user would have if the number of pennies they received on every day doubled.</p>
  
  <p>The problem I'm running into is that when I add a "for" loop into the script, I start to get a "Uncaught SyntaxError: Unexpected token )" error. As far as I can tell, all the syntax looks correct to me, and the error goes away if I change the loop to a "while" loop.</p>
  
  <p>I'm curious about what exactly it is that I'm running into here, and how do I keep it from happening?</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  
  &lt;script&gt;
  
  var penny = 0;
  var days = 0;
  var total = 0;
  
  function pCalc() {
  
  //establish variables
  var penny = prompt("Enter number of pennies.", "Enter a number");
  var days = prompt("Enter number of days.", "Enter a number");
  var total = 0;
  
  //double pennies on every day, and add each day's pennies to the total
  for (i = 0, i &lt; days, i++){
  
      //add pennies to total
      total = penny + total;
  
      //double pennies for each day
      penny = penny + penny;
      }
  
  
  }
  &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div style="margin: 20px; padding: 100px; width: 100px; height: 100px; background-color: #00f;" onClick="pCalc()"&gt;
  &lt;p style="font-weight:bold; font-size: 20px;"&gt;Click me&lt;/p&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>