title: Convert a whole number amount of cents to a readable dollar amount in JavaScript?
body: <pre><code>var num = 1629; // this represents $16.29
  num.toLocaleString("en-US", {style:"currency", currency:"USD"});
  // outputs $1,629
  </code></pre>
  
  <p>So far this is as close as I can come. I tried all of the options that toLocaleString provides but there seems to be no easy way to get the outcome I want (which is not as expected). Is there no built-in function that exists in JS?</p>
  
  <p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString" rel="noreferrer">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString</a></p>