Clock Readings
MediumAcc. 89.2%
+30 XP 10
Standard Breakdowns
Sorting huge numerical lengths carefully to neat minutes and seconds allows end-users easily to see video duration. Using reliable modulo operations lets us easily take remainders.
The Assignment
- Divide broadly the
totalSecondsclearly intominutesrounded efficiently alongside leftoverremainingSeconds. - Form your message as: "[totalSeconds] seconds is [minutes] minutes and [remainingSeconds] seconds."
01EXAMPLE 1
Input
totalSeconds = 130Output
"130 seconds is 2 minutes and 10 seconds."Explanation: Appropriately scales lengths smoothly.
Constraints
- Use correctly Math.floor().
- Deploy modulo logic accurately.
FundamentalsMathStrings
JavaScriptSystem handles I/O — write your function only
Loading...
5 Hidden
Input Arguments
totalSeconds130
Expected Output
130 seconds is 2 minutes and 10 seconds.
Click RUN to test your solution