title: Javascript - Left hand side assignment
body: <p>I get a left hand side assignment error for the following code. I checked my equality operators over and over and I could not find something wrong.</p>
  
  <pre><code>function priceCal() {
      //declares
      var hourRate = 0.01;
      var dayRate = 7;
      var fullDayHours = 6 * 60;
  
      var dateStart = $('#datepickerStart').datepicker('getDate');
      var hourStart = $('#timepickerStart').timepicker('getTime');
      var dateEnd = $('#datepickerEnd').datepicker('getDate');
      var hourEnd = $('#timepickerEnd').timepicker('getTime');
  
      var totalDays = (dateEnd - dateStart) / 24 / 60 / 60 / 1000; //we get total days
      var totalHours = (hourEnd - hourStart) / 60 / 1000;          //we get total minutes
      var startHours = (hourStart) / 60 / 1000;
      var endHours = (hourEnd) / 60 / 1000;
  
      var endRate = (hourEnd * hourRate);
      var startRate = (hourStart * hourRate);
      var daysRate = (totalDays * dayRate);
  
      // Both days are full
      if (totalDays &gt; 0 &amp;&amp; startHours &gt;= 360 &amp;&amp; endHours &gt;= 360) {
          console.log("Rate is " + (totalDays * dayRate));
      }
  
      //Both days are not full
      if (totalDays &gt; 0 &amp;&amp; startHours &lt; 360 &amp;&amp; endHours &lt; 360) {
          console.log("Rate is" + (totalDays * dayRate - 14) + (hourStart * hourRate) + (hourEnd * hourRate));
      }
  
      //Start day is full
      if (totalDays &gt; 0 &amp;&amp; startHours &gt;= 360 &amp;&amp; endHours &lt; 360) {
          console.log("Rate is " = (totalDays * dayRate - 7) + (hourEnd * hourRate));
      }
  
      //End day is full
      if (totalDays &gt; 0 &amp;&amp; startHours &lt; 360 &amp;&amp; endHours &gt;= 360) {
          console.log("Rate is " = (totalDays * dayRate - 7) + (hourStart * hourRate));
      }
  </code></pre>
  
  <p>Thank you in advance</p>
  
  <p>EDIT: Really bad question, I was pretty reckless programming this script.</p>