Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sumseconds (input){
- let timeFirst= (input.shift());
- let timeSecond= (input.shift());
- let timeThird= (input.shift());
- let totaltime = timeFirst + timeSecond + timeThird;
- console.log(totaltime);
- let minutes = Math.floor(totaltime/60);
- let seconds = (totaltime %60 );
- if (seconds<10){
- console.log (`${minutes}:0${seconds}`)
- }
- else {
- console.log(`${minutes}:${seconds}`)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement