A Long Long Time

Published by Mubashir Hassan in

Create a function that takes three values:

  • h hours
  • m minutes
  • s seconds

Return the value that's the longest duration.

Examples

longestTime(1, 59, 3598) ➞ 1

longestTime(2, 300, 15000) ➞ 300

longestTime(15, 955, 59400) ➞ 59400

Notes

No two durations will be the same.

Watch a quick demo on how Edabit works.