mercredi 5 août 2015

parseFloat returns nan


I'm trying to get rid of currency sign in order to calculate new price using parseFloat, but it returns nan for some reason.

var pricePerUser = "£19.99";
pricePerUser = parseFloat(pricePerUser) * 3;
console.log(pricePerUser); //Returns NaN



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire