2 decimal places in Javascript/jQuery

I always forget how to format a number as 2 decimal places in Javascript/jQuery, its extremely simple, just use the unmemorable toFixed() function - refer below is an example


Justin Kelly

Justin Kelly

Web Developer, Business Analytics, Data Engineer specialising in PHP and Tableau

Based in Melbourne, Australia

Feel free to contact me justin@kelly.org.au or _justin_kelly

Leave a comment

Notify me of replies by email.