convertir string en int js code example
Example 1: how to convert string to int js
let string = "1";
let num = parseInt(string);
//num will equal 1 as a int
Example 2: intval js
parseInt(value);
let string = "321"
console.log(string); // "321" <= string
let number = parseInt(string);
console.log(number) // 321 <=int