Problem Statement
Explain the use of the Timers module in Node.js.
Explanation
The Timers module allows scheduling of code execution after a specified time. It provides functions like `setTimeout()`, `setInterval()`, and `setImmediate()` to run callbacks asynchronously in future event loop phases.
Code Solution
SolutionRead Only
setTimeout(()=>console.log('After delay'),1000);
setImmediate(()=>console.log('Next phase'));