Answers for "how to change commas to dot in autonumeric js"

3

format number with commas js

foramtNumber = (num,div=",")=>{
  return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, div);

}
Posted by: Guest on December-10-2020
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 "how to change commas to dot in autonumeric js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language