Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

87
Views
Orden de ejecución en bucle de eventos

¿Por qué setTimeout (devolución de llamada), Promise.resolve () .then (devolución de llamada) y requestAnimationFrame (devolución de llamada) tienen una prioridad diferente para ejecutar? El siguiente es un ejemplo de código:

 setTimeout(()=>console.log(1)); Promise.resolve(2).then(console.log); requestAnimationFrame(()=>console.log(3)); console.log(4); window.onclick = ()=>console.log(5); window.dispatchEvent(new Event('click'));

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

sincronización

 console.log(4); window.onclick = ()=>console.log(5); window.dispatchEvent(new Event('click'));

Microtareas

 Promise.resolve(2).then(console.log); requestAnimationFrame(()=>console.log(3));

tarea macro

 setTimeout(()=>console.log(1));
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!