Ad
Fundamentals
Strings
Data Types
Code
Diff
  • const minutes = (n) => `${Math.trunc(n / 60)}:${("0" + (n % 60)).slice(-2)}`;
    • function minutes(num){
    • const minutes = num % 60
    • const hours = (num - minutes)/60
    • return `${hours}:${("0" + minutes).slice(-2)}`
    • }
    • const minutes = (n) => `${Math.trunc(n / 60)}:${("0" + (n % 60)).slice(-2)}`;