InterviewSolution
Saved Bookmarks
| 1. |
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) Will execute immediately |
|
Answer» Right answer is (b) Placed in queue To explain: 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. |
|