Hello friends I have the following arrangement
datos = ["1,andres", "2, julian", "3,juan", "12,carlos"]
I want to get the numbers of each element.
I have this but I think I need the index of the comma to be able to tell the substr to remove me from the position given by the , I will use indexof
datos.map(element => {
console.log(element.substr(0, 2));
})