I want to replace a floating number by another one in my string using Javascript.
Examples:
var string1 = '$10.50';
var string2 = '$10.50 USD';
var string3 = '10.50 €';
Results:
var newFloatNb = 15.99;
string1 = '$15.99';
string2 = '$15.99 USD';
string3 = '15.99 €';
Anyway to do this? I want to keep the currencies that are not always the same.