This is simple script will convert any raw number into string format with thousand separator. It is useful if you want to show a currency formatted number. Remember, converted value is string, not number.

Run this script and now variable myNumber contains this value: “232,545,355” from previous value: 232545355.


Habibie is an Indonesian freelance PHP, MySQL, HTML5, CSS3, JavaScript, Java, Python and C# programmer. He also do graphics design, video editing, visual effects, animation, 3D modeling and making games.

Related Post

JavaScript thousand separator