Im trying to put one music to play after the previous one ended but for some reason my timer doesnt work and they all just start on top of one another not waiting the time it should
var musics = [music1,music2,music3,music4,music5,music6]
var musicas = shuffle(musics)
var z = 0
var timerr = 0
function zz (){
musicas[z].currentTime=0
musicas[z].play()
timerr = musicas[z].duration
z++
console.log(timerr)
}
setInterval(zz,timerr)
basically on this console.log it shows the duration of each music at the same time just one time for some reason so idk what im doing wrong
(javascript)