title: Using parseFloat() for decimal
body: <p>I'm trying to make a simple calculator using buttons, but I'm having trouble when it comes to placing a decimal point.  I'm trying to take the number up to that point, add a decimal character (thus making it a string), and using <code>parseFloat</code> to make it a number once again.  Here is my code:</p>
  
  <pre><code>function decimalButton() {
    inputValue = inputValue + ".";
    inputValue = Number.parseFloat(inputValue);
    show(inputValue);
  }
  </code></pre>
  
  <p>Where <code>inputValue</code> is originally an <code>int</code>, and <code>show()</code> simply displays whatever value I put in it.</p>
  
  <p>However, when I run this code, there is no decimal added to the display, and it treats it as one large integer (for example, 44.6 is displayed and treated as 446.</p>
  
  <p>But if I code out the <code>parseFloat</code> line, I'll get the correct display, but it's a string and I can't do anything with it.  Any help would be appreciated.</p>