Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angular string to number

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

var stringToConvert = "A123";
var numberValue = Number(stringToConvert);
console.log(numberValue);
//Returns NaN
Source by www.angularjswiki.com #
 
PREVIOUS NEXT
Tagged: #angular #string #number
ADD COMMENT
Topic
Name
7+2 =