javascript

javascript string currency

숨쉬는 개발자 2018. 9. 18. 14:01
반응형

var str = "123456123";

str.replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");