Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
Fundamentals
Strings
Code
Diff
  • const minutes = (n) => `${Math.trunc(n / 60)}:${("0" + (n % 60)).slice(-2)}`;
  • 1-function minutes(num){
    2- const minutes = num % 60
    3- const hours = (num - minutes)/60
    4- return `${hours}:${("0" + minutes).slice(-2)}`
    5-}
    1+const minutes = (n) => `${Math.trunc(n / 60)}:${("0" + (n % 60)).slice(-2)}`;