Schedule code execution using timers.
Source Code
setTimeout(() => console.log('Executes after 2 seconds'), 2000);
let intervalId = setInterval(() => console.log('Executes every 3 seconds'), 3000);
// To clear the interval
clearInterval(intervalId);