How to replace the first comma with a dot in TypeScript

1 Answer

0 votes
let str = '9,649,137,093';

str = str.replace(/,/, '.');

console.log(str); 
  


  
/*
run:
  
"9.649,137,093"
  
*/

 



answered May 21, 2022 by avibootz

Related questions

2 answers 119 views
1 answer 111 views
1 answer 110 views
2 answers 135 views
2 answers 130 views
...