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

Snippets Tagged "function" 1 result found

Format Currency Javascript 681
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