Cómo convertir la cadena a int js
let string = "1";
let num = parseInt(string);
//num will equal 1 as a int
Unusual Unicorn
let string = "1";
let num = parseInt(string);
//num will equal 1 as a int
var x = Number("1000")
const three = "3";
typeof(three);
// 'string'
const threeInt = parseInt(three, 10);
typeof(threeInt);
// 'number'