ribuan dengan koma javascript
function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}
kripi__
function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}
var number = 3500;
console.log(number.toLocaleString());
value.toLocaleString()
"1,000"