출처: https://twitter.com/#!/ded/status/13621796430




var no = 1234567;

alert(no); // 1234567


String(no).split("").reverse().join("").replace(/(.{3}\B)/g, "$1,").split("").reverse().join("");

alert(no); // 1,234,567















Posted by bloodguy
,