How to use regular expressions to round to 2 decimal places using javascript

后端 未结 0 1583
迷失自我
迷失自我 2021-01-18 02:59

I have prices coming in from a database without a decimal. For example $40 dollars will be received 4000. I am using regex to add the decimal like so

    var          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题