atoi javascript code example
Example 1: intval js
parseInt(value);
let string = "321"
console.log(string); // "321" <= string
let number = parseInt(string);
console.log(number) // 321 <=int
Example 2: Javascript string to int
var myInt = parseInt("10.256"); //10
var myFloat = parseFloat("10.256"); //10.256