April 20th, 2024
What's missing in this code?
// Get seconds from time unit
// e.g., getSeconds('2:10:10') -> 7810
// e.g., getSeconds('9:05') -> 32700
function getSeconds(str)
const
= str
.
(':')
.map(
);
return hours *
+ minutes * 60 + seconds;
Type or select from these options