title: Converting number abbreviations (5.2k, 1.7m, etc) into valid integers with JavaScript
body: <p>I have a Google Doc with a column containing a variety of numbers written in "shorthand", for example:</p>
  
  <pre><code>5k for 5,000
  86.62k for 86,620
  4.1m for 4,100,000
  1.2b for 1,200,000,000
  </code></pre>
  
  <p>I'd like to do some calculations with these numbers with JavaScript (loosely used by Google Docs), but I need to convert them into valid integers in order to do so. How could I do this with JavaScript?</p>
  
  <p>I see this has been done in PHP ( <a href="https://stackoverflow.com/questions/5467694/converting-number-abbreviations-5-2k-1-7m-etc-into-valid-integers-with-php">Converting number abbreviations (5.2k, 1.7m, etc) into valid integers with PHP</a>) but not finding anything with JS. </p>