Skip to content

Commit 098a808

Browse files
committed
fixed seconed in duration
if the seconed were less than ten it would give 00:0 insted 00:00.
1 parent 166ba91 commit 098a808

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const player = {
5050
],
5151
playSong(song) {
5252
console.log(`Playing ${song.title} from ${song.album} by ${song.artist} | `
53-
+((Math.floor(song.duration/60))<10? "0": "")+`${Math.floor(song.duration/60)}:${song.duration%60}.`)
53+
+((Math.floor(song.duration/60))<10? "0": "")+`${Math.floor(song.duration/60)}:` +((song.duration%60)<10? "0": "")+`${song.duration%60}.`)
5454
}
5555
}
5656

0 commit comments

Comments
 (0)