JSFiddle - React, Tailwind, and code Playground
JavaScript
const convert1000 = (time) => {
const [h,m,s] = time.split(':');
let seconds = (h*3600) + (m * 60) + parseInt(s);
return seconds;
}
alert(convert1000("00: 30: 00"))
const convert1000 = (time) => {
const [h,m,s] = time.split(':');
let seconds = (h*3600) + (m * 60) + parseInt(s);
return seconds;
}
alert(convert1000("00: 30: 00"))