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

  1. Divide broadly the totalSeconds clearly into minutes rounded efficiently alongside leftover remainingSeconds.
  2. Form your message as: "[totalSeconds] seconds is [minutes] minutes and [remainingSeconds] seconds."

01EXAMPLE 1

InputtotalSeconds = 130
Output"130 seconds is 2 minutes and 10 seconds."

Explanation: Appropriately scales lengths smoothly.

Constraints

  • Use correctly Math.floor().
  • Deploy modulo logic accurately.
FundamentalsMathStrings
JavaScript
Loading...
5 Hidden

Input Arguments

totalSeconds130

Expected Output

130 seconds is 2 minutes and 10 seconds.

Click RUN to test your solution