Posts Tagged ‘Number’

6 very basic but very useful JavaScript Number Format Functions for web developers

How number is treated in JavaScript? JavaScript is loosely typed and the plus operator also concatenates, you can easily convert JavaScript Numbers to Strings similar to this: 1 + “”, but as we all know that JavaScript doesn’t have many built-in methods to format numbers. Most of the time we need to write our customized code to do it.The following is 6 very useful JavaScript number format function,why have to re-inventing the wheel? Don’t waste your valuable time to write it by yourself, only copy which you like and use it!

Of course if you had wrote your proudly number format function,don’t only stock in your hard disk( or your head), let’s share!