JQuery - How to remove the , in the number format?

$rupees = $rupees.replace(/,/g,'');
g is used to remove all the occurance of , in the number format.