Вы попали на английскую версию сайта. Большая часть курсов доступна на русском языке

Formatted time Course Challenge: Intro to Programming

formattedTime.js

Implement and export as default a function that takes an amount of minutes as input and returns a string representing time in this format: hh:mm.

Examples:

formattedTime(5); // 00:05
formattedTime(15); // 00:15
formattedTime(60); // 01:00
formattedTime(67); // 01:07
formattedTime(175); // 02:55
formattedTime(600)); // 10:00
formattedTime(754); // 12:34

Hint

  • Use Math.floor(number) to round the number down.
Successful completion: 94%

For full access to the challenge you need a professional subscription.

A professional subscription will give you full access to all Hexlet courses, the opportunity to seek help from mentors and lifetime access to the theory of lessons learned. You can cancel your subscription at any time.

Get access
115
courses
892
exercises
2241
hours of theory
3196
tests

Last code review

User Updated at Submissions count
joisadler 09 Mar 09:41 1