Q. What will happen if we call setTimeout() with a time of 0 ms?

  • (A) Placed in stack
  • (B) Placed in queue
  • (C) Will run continuously
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (B) Placed in queue
Explanation: If you call setTimeout() with a time of 0 ms, the function you specify is not invoked right away. Instead, it is placed on a queue to be invoked “as soon as possible” after any currently pending event handlers finish running.
Explanation by: Mr. Dubey
If you call setTimeout() with a time of 0 ms, the function you specify is not invoked right away. Instead, it is placed on a queue to be invoked “as soon as possible” after any currently pending event handlers finish running.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
136
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
82%
Success Rate