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

93
Views
Flujo de programa- requestAnimationFrame

Este código JS cuando se ejecuta da una salida. ¿No debería esto conducir a infinitas llamadas recursivas y, por lo tanto, mostrar el límite de tiempo excedido? Por favor explique el flujo del programa.

 function main(ctime){ window.requestAnimationFrame(main); if(start==undefined){ start= ctime; } if((ctime-start)/1000<0.5){ console.log(ctime); return; } } window.requestAnimationFrame(main);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Aquí no hay recursión. window.requestAnimationFrame(main); simplemente pone el main en la cola de devolución de llamada sin ejecutarlo o esperarlo (como lo hace setTimeout() ) y regresa inmediatamente, luego se ejecuta la siguiente línea.

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!