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

79
Views
setTimeout presionando todo a la vez en lugar de cada 1 segundo

¿Por qué setTimeout se ejecuta 10 veces en un bucle a la vez, en lugar de esperar un segundo, luego ejecutar, esperar un segundo y ejecutar, etc.?

 const tx = document.querySelector('.botex') console.log(tx.lastElementChild.className) for(let i =0;i<10;i++) { setTimeout(() => { let msg = document.createElement('p'); msg.textContent = "Hello there" + i; tx.appendChild(msg); }, 1000) }
 <div class="botex"> <div class="1"> </div> <div class="2"> </div> </div>

about 4 years ago · Juan Pablo Isaza
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!