-3

As per question title, what is the best way to convert Brazilian Reais to Javascript number?

For example:

115.000.300,50 => 115000300.5

I want the opposite of what is answered on the question How can I format numbers as money in JavaScript?.

Community
  • 1
  • 1
RedDragon
  • 2,080
  • 2
  • 26
  • 42

1 Answers1

1
var val = parseFloat("115.000.300,50".replace(/\./g, '').replace(',', '.'));
Maxx
  • 1,740
  • 10
  • 17