what is the use of parseInt code example
Example 1: parseint javascript
var myInt = parseInt("10.256"); //10
var myFloat = parseFloat("10.256"); //10.256
Example 2: parseint method
parseInt("10"); // returns 10
parseInt("10.33"); // returns 10
parseInt("10 20 30"); // returns 10
parseInt("10 years"); // returns 10
parseInt("years 10"); // returns NaN