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

248
Views
¿Por qué este código se ejecuta correctamente si y solo si llamo a la función setTimeOut() y el código no cumple su objetivo exactamente sin llamarlo?
app.get("/", function(req, res) { var posts = []; Post.find({}, function(err, arr) { if (err) { console.log("error"); } else { posts = arr; } }); // res.render("home",{par:par,posts:posts}) setTimeout(function() { res.render("home", { par: par, posts: posts }) }, 300); });

el código solo cumple su objetivo cuando se usa la función setTimeout incluso si la función dentro de setTimeout es la misma función comentada que no funciona correctamente

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!