Node.js - Timers and Scheduling
Consider this code:
let count = 0;
const intervalId = setInterval(() => {
console.log(count);
count++;
if (count > 2) clearInterval(intervalId);
}, 1000);
What will be the output?