Answers for "format amount with comma in javascript"

36

thousands by comma javascript

function numberWithCommas(x) {
  return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}
Posted by: Guest on June-13-2020
3

format number javascript with comma

formatedNumber = new Intl.NumberFormat().format(2561556862056.12)
console.log(formatedNumber) // "2,561,556,862,056.12"
Posted by: Guest on October-03-2021
0

javascript format number with commas

let n = 234234234;
let str = n.toLocaleString("en-US");
console.log(str); // "234,234,234"
Posted by: Guest on March-01-2022

Code answers related to "format amount with comma in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language