Created
April 20, 2019 16:48
-
-
Save waghcwb/0a2b6f771d405f488c8deced48bfc7ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// timeFormat = 'mm:ss' | |
function convertToSeconds(time) { | |
const [ minutes, seconds ] = time.split(':') | |
const minutesToSeconds = (Number(minutes) * 60) | |
return minutesToSeconds + Number(seconds) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment