-6

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
panthro
  • 22,779
  • 66
  • 183
  • 324

1 Answers1

1
$ node
> parseInt('$1,000,000'.replace(/,|\$/g,''))
1000000
Gilles Quénot
  • 173,512
  • 41
  • 224
  • 223