标签: javascript
I have a number string:
$1,000,000
Is there an easy way to convert it to a number figure soit can be worked with as a number.
1000000
答案 0 :(得分:1)
$ node > parseInt('$1,000,000'.replace(/,|\$/g,'')) 1000000