, a code gallery for creating, saving and sharing all kinds of code snippets.

Snippets Tagged "format" 1 result found

Format Currency Javascript 734
Author: rpjs Posted On: Saturday, May 10, 2014

This function will round numbers to two decimal places, and ensure that the returned value has two decimal places. For example 12.006 will return 12.01, .3 will return 0.30, and 5 will return 5.00