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

153
Vistas
Using Asynchronous, Foreach and arguments.callee

I put **** in some places because the production is too long. my aim is: I don't want it to switch to the 2nd foreach list until all the operations in the 1 foreach list are finished. I used arguments.callee until that element came inside, because when I clicked somewhere on the site where I was going to process, a loading site opened and waited. For the line where I use the item element, it gives the error "Uncaught SyntaxError: Invalid left-hand side in assignment".

var asd = (async()=>{
    var list = ["******","******"];
    list.forEach(async (item) =>  {
        await document.querySelector("******").click();
        await document.querySelector("******").click();
        await document.querySelector("******").click();

        (async function()  {
            if(document.querySelector("*****").className.indexOf("*****") == -1) {
                await document.querySelector("*****").select();
                await document.querySelector("*****").value="name : "+item;
                const event = await $.Event('keyup');
                event.which = 13;
                event.keyCode = 13;
                await $('*****').trigger(event);
            }
            else setTimeout(arguments.callee, 1000);
        })
    })
})
asd();
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