parseInt(....)
var stringToConvert = "759"; var numberValue = Number(stringToConvert); console.log(numberValue); //Returns 759 var stringToConvert = "A123"; var numberValue = Number(stringToConvert); console.log(numberValue); //Returns NaN