-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
  • 21,049
  • 61
  • 166
  • 295

1 Answers1

1
$ node
> parseInt('$1,000,000'.replace(/,|\$/g,''))
1000000
Gilles Quenot
  • 154,891
  • 35
  • 213
  • 206