title: Script not working. Lint says Semicolon required
body: <p>I am a beginner to Javascript Programming and have run into an error I cannot work out as I don't understand the code. Lint tells me there is a semi colon needed before the line <code>var dString = "September, 25, 2015";</code>. I did have this working and don't know what I changed. I got the code from <a href="https://stackoverflow.com/q/7763327">this</a> question.</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;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;title&gt;
      Saving
    &lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;script&gt;
      function myFunction() {
        if (txtMoneySaved.value !== "" &amp;&amp; !isNaN(txtMoneySaved.value) &amp;&amp; txtMoneyGoal.value !== "" &amp;&amp; !isNaN(txtMoneyGoal.value)) {
          // It's a number
          numValue = parseFloat(txtMoneySaved.value);
          DollarGoal = parseFloat(txtMoneyGoal.value);
          document.getElementById("demo").innerHTML = numValue;
  
          var DateDiff = {
            inDays: function(d1, d2) {
              var t2 = d2.getTime();
              var t1 = d1.getTime();
              return parseInt((t2 - t1) / (24 * 3600 * 1000), 10);
            },
            inWeeks: function(d1, d2) {
              var t2 = d2.getTime();
              var t1 = d1.getTime();
              return parseInt((t2 - t1) / (24 * 3600 * 1000 * 7), 10);
            },
            inMonths: function(d1, d2) {
              var d1Y = d1.getFullYear();
              var d2Y = d2.getFullYear();
              var d1M = d1.getMonth();
              var d2M = d2.getMonth();
              return (d2M + 12 * d2Y) - (d1M + 12 * d1Y);
            },
            inYears: function(d1, d2) {
              return d2.getFullYear() - d1.getFullYear();
            }
          }
  
          var dString = "September, 25, 2015";
  
          var d1 = new Date();
          var d2 = new Date(dString);
  
          var DolsDay = (DollarGoal - numValue) / DateDiff.inDays(d1, d2);
          var DolsWeek = (DollarGoal - numValue) / DateDiff.inWeeks(d1, d2);
          var DolsMonth = (DollarGoal - numValue) / DateDiff.inMonths(d1, d2);
  
          document.getElementById("DaysRemaining").innerHTML = "Number of &lt;b&gt;days&lt;/b&gt; until " + dString + "&lt;b&gt;:&lt;/b&gt; " + DateDiff.inDays(d1, d2) + "&lt;br&gt;Dollars per day to reach $8000&lt;b&gt;:&lt;/b&gt; $" + DolsDay.ToFixed(2);
          document.getElementById("WeeksRemaining").innerHTML = "Number of &lt;b&gt;weeks&lt;/b&gt; until " + dString + "&lt;b&gt;:&lt;/b&gt; " + DateDiff.inWeeks(d1, d2) + "&lt;br&gt;Dollars per week to reach $8000&lt;b&gt;:&lt;/b&gt; $" + DolsWeekToFixed(2);
          document.getElementById("MonthsRemaining").innerHTML = "Number of &lt;b&gt;months&lt;/b&gt; until " + dString + "&lt;b&gt;:&lt;/b&gt; " + DateDiff.inMonths(d1, d2) + "&lt;br&gt;Dollars per month to reach $8000&lt;b&gt;:&lt;/b&gt; $" + DolsMonthToFixed(2);
        }
        //else some error message
      }
    &lt;/script&gt;
  
    Enter the amount saved: &lt;input type="text" name="Saved" id="txtMoneySaved" value="100"&gt; Enter the goal amount:&amp;nbsp;&amp;nbsp;&lt;input type="text" name="Goal" id="txtMoneyGoal" value="8000"&gt;
  
    &lt;button onclick="myFunction()"&gt;Try it&lt;/button&gt;
  
    &lt;p id="demo"&gt;&lt;/p&gt;
  
    &lt;p id="DaysRemaining"&gt;&lt;/p&gt;
    &lt;p id="WeeksRemaining"&gt;&lt;/p&gt;
    &lt;p id="MonthsRemaining"&gt;&lt;/p&gt;
    &lt;p id="YearsRemaining"&gt;&lt;/p&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>