var num = 12345678;
var str = num.number_with_delimiter();
alert(str);
This will show that str is "12,345,678".
Her's my version of the code:
Based on code from: http://kevinvaldek.com/number-with-delimiter-in-javascript
A simple blog about the coding I do when I can't sleep.
var num = 12345678;
var str = num.number_with_delimiter();
alert(str);