JavaScript thousand separator

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.

Published by


Habibie is an Indonesian freelance frontend-backend web developer and cross platform mobile app programmer. He's also good at graphics design, video editing, visual effects and animation.