title: JavaScript displaying a float to 2 decimal places
body: <p>I wanted to display a number to 2 decimal places.</p>
  
  <p>I thought I could use <code>toPrecision(2)</code> in JavaScript .</p>
  
  <p>However, if the number is <code>0.05</code>, I get <code>0.0500</code>. I'd rather it stay the same.</p>
  
  <p>See it on <a href="http://jsbin.com/eguvo/edit" rel="noreferrer">JSbin</a>.</p>
  
  <p>What is the best way to do this?</p>
  
  <p>I can think of coding a few solutions, but I'd imagine (I hope) something like this is built in?</p>