← Back to challenges

Convert Hours into Seconds

JavaScriptMediummathnumberslanguage_fundamentals

Instructions

Write a function that converts hours into seconds.

Examples

howManySeconds(2) ➞ 7200

howManySeconds(10) ➞ 36000

howManySeconds(24) ➞ 86400

Notes

  • 60 seconds in a minute, 60 minutes in an hour
  • Don't forget to return your answer.
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Maximum Edge of a Triangle