Created
October 26, 2017 19:34
-
-
Save jasonfigueroa/eeb403a745b5c22e07c20e446136695b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// returns formatted time in minutes and seconds as a string | |
const formattedTime = (timeInMilliseconds) => { | |
const time = timeInMilliseconds; | |
let timeStr = ""; | |
const minutes = Math.floor(time / 60000); | |
const seconds = (time % 60000) / 1000; | |
return `${ minutes } minutes and ${ seconds } seconds`; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment