Decimal Formatting in JS/CoffeeScript

Posted on

Took a bit to find this one, though it’s something everybody should just know (and maybe everybody does except for me..)

number = 24.54616515.toFixed 2    #24.55

Leave a Reply

Your email address will not be published. Required fields are marked *