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

254
Views
Why setTimeout works on Node JS?

I am hearing that setTimeout(), the Web API is not included in JavaScript quite often. So, if it is only Web API it is natural to think as it won't work anywhere except in the browser. So, why setTimeout is working in my terminal when I just run a plain old JS file with the node ${filename} command?

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

0

The browser and node.js both have a global setTimeout function, but the return types are different between the two.

  • node.js setTimeout returns a Timeout object: https://nodejs.org/api/timers.html#settimeoutcallback-delay-args
  • Browser setTimeout returns an integer timer id: https://developer.mozilla.org/en-US/docs/Web/API/setTimeout
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!