Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

220
Visualizações
setinterval not repeating function in the time i want to

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)

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda