title: Adding two numbers in JavaScript incorrectly
body: <pre><code>Global.alert("base: " + base + ", upfront: " + upfront + ", both: " + (base + upfront));
  </code></pre>
  
  <p>The code above outputs something like:</p>
  
  <pre><code>base: 15000, upfront: 36, both: 1500036
  </code></pre>
  
  <p>Why is it joining the two numbers instead of adding them up?</p>
  
  <p>I eventually want to set the value of another field to this amount using this:</p>
  
  <pre><code>mainPanel.feesPanel.initialLoanAmount.setValue(Ext.util.Format.number((base + upfront), '$0,000.00'));
  </code></pre>
  
  <p>And when I try that, it turns the number into the millions instead of 15,036.00. Why?</p>