Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

207
Vistas
How to loop through an array after an interval of 5 second for every value in the array?

      const array = [
        "aplus",
        "ant",
        "bean",
        "cookie",
        "corncob",
        "corndog",
        "potato",
        "skunk",
        "rabbit",
        "duck",
        "deer",
        "boar",
        "dragon",
        "seaweed",
        "fish",
        "rarefish",
        "exoticfish",
        "jellyfish",
        "legendaryfish",
        "kraken",
        "junk",
        "garbage",
        "trash",
        "worm",
        "ladybug",
        "stickbuy",
        "spider",
        "banhammer",
        "musicalnote",
        "energydrink",
        "memepills",
        "lawdegree",
        "vaccine",
        "beakerofsusfluid",
        "ectoplasm"
      ];
    setTimeout(function(){
      for (const item of array){
    console.log(item);
}
    }, 5000)

Is there a way to log all the items in the array after an interval of 5 seconds for each item?

When I try to use an setTimeout function it sends the first value after 5 second and after that it sends all the other values at once..

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda