Intval JS
parseInt(value);
let string = "321"
console.log(string); // "321" <= string
let number = parseInt(string);
console.log(number) // 321 <=int
Joyous Jaguar
parseInt(value);
let string = "321"
console.log(string); // "321" <= string
let number = parseInt(string);
console.log(number) // 321 <=int
var myInt = parseInt("10.256"); //10
var myFloat = parseFloat("10.256"); //10.256
// try using parsInt(x)
// you can then use typeof(x) to confirm
var myString = "555";
var myInt = parseInt(string);
console.log(typeof myInt); // number