title: Adding let values together in JavaScript
body: <p>I'm working on a tax calculator app with JavaScript and have a problem adding let values. </p>
  
  <p>When trying to add 3 different tax values together, in the console, the answer I always get is the first of the values.</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-js lang-js prettyprint-override"><code>let basicRate,
    higherRate,
    additionalRate;
  
  function calculateTaxDue(grossSalary) {
    if (grossSalary &gt; 150000) {
      basicRate = parseFloat((46351 - 11000) * 0.2).toFixed(2);
      higherRate = parseFloat((150000 - 46351) * 0.4).toFixed(2);
      additionalRate = parseFloat((grossSalary - 150000) *
        0.45).toFixed(2)
      taxDue = parseFloat((basicRate + higherRate +
        additionalRate)).toFixed(2);
    }
  }
  
  
  calculateTaxDue(150001)
  
  console.log(parseFloat(basicRate).toFixed(2));
  console.log(parseFloat(higherRate).toFixed(2));
  console.log(parseFloat(additionalRate).toFixed(2));
  
  console.log(parseFloat(basicRate + higherRate +
    additionalRate).toFixed(2));</code></pre>
  </div>
  </div>
  </p>
  
  <p>Just prints the first value (basicRate) to the console. I'm confused by this.</p>
  
  <p>Apologies for lack of detail first time around.</p>
  
  <p>Thanks</p>