Menambahkan koma setelah tahun
let num = 1234567.89;
let commas = num.toLocaleString("en-US");
commas = num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
Homely Hoopoe
let num = 1234567.89;
let commas = num.toLocaleString("en-US");
commas = num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");