You can use “map” as below
arr.map(d => {
let [min, sec] = d.split(':')
return +min * 60 + +sec
})
0
solved convert strings to numbers inside array JavaScript
You can use “map” as below
arr.map(d => {
let [min, sec] = d.split(':')
return +min * 60 + +sec
})
0
solved convert strings to numbers inside array JavaScript