SHARE
TWEET

Untitled

a guest Jan 19th, 2020 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function sumseconds (input){
  2.  
  3.     let timeFirst= (input.shift());
  4.     let timeSecond= (input.shift());
  5.     let timeThird= (input.shift());
  6.     let totaltime = timeFirst + timeSecond + timeThird;
  7.      console.log(totaltime);
  8.    let minutes = Math.floor(totaltime/60);
  9.     let seconds = (totaltime %60 );
  10.  
  11.     if (seconds<10){
  12.     console.log (`${minutes}:0${seconds}`)
  13.     }
  14.     else {
  15.         console.log(`${minutes}:${seconds}`)
  16.     }
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top