ใช้ Intl.NumberFormat() เพื่อจัดรูปแบบตัวเลขคั่นหลักพัน
ตัวอย่าง
<!DOCTYPE html> <html>
<body>
<script>
var number = 24287995;
document.write(new Intl.NumberFormat().format(number));
</script>
</body>
</html>
ผลลัพธ์
24,287,995