 <p>If you follow the link below you can import the number_format php function to javascript. The function has been helping me for years now.</p> <p>Here is the function signature : </p> <pre><code>function number_format (number, decimals, dec_point, thousands_sep) </code></pre> <p><a href="http://phpjs.org/functions/number_format:481" rel="nofollow">http://phpjs.org/functions/number_format:481</a></p>