Convert Timecode to Seconds
STRING
MATH
Problem
Given a string timecode
representing time in the format "hh:mm:ss", return the total number of seconds represented by the timecode
.
The timecode input will always be valid.
Examples
timecodeToSeconds("00:01:00") // 60 timecodeToSeconds("01:01:00") // 3660 timecodeToSeconds("02:30:15") // 9015
Loading...