Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Time (input){
- let firstTime = Number(input.shift());
- let secondTime = Number(input.shift());
- let thirdTime = Number(input.shift());
- let TotalTime = firstTime + secondTime + thirdTime;
- let min = Math.floor(TotalTime/60);
- let sec = TotalTime % 60;
- if (sec<10){
- console.log (`${min}:0${sec}`);
- }else{
- console.log (`${min}:${sec}`);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement