title: JS - Format number with 2 decimal not rounded
body: <p>I would format a number with 2 decimal places without rounding.
  So I excluded the toFixed() function.</p>
  
  <p>I have tried this way</p>
  
  <pre><code>a = 1,809999
  b = 27,94989
  
  a = Math.floor(a * 100) / 100; --&gt; 1,8
  b = Math.floor(b * 100) / 100; --&gt; 27,94
  
  OR
  
  a = Number(a.toString().match(/^\d+(?:\.\d{0,2})?/)); --&gt; 1,8
  b = Number(b.toString().match(/^\d+(?:\.\d{0,2})?/)); --&gt; 27,94
  </code></pre>
  
  <p>Unfortunately, the second decimal of a is zero, and this was deleted, how could I do to keep it and have a = 1.80?
  Thank you</p>