Question 5
Consider the following code snippet
function createCounter() { let count = 0;
return function() { count++; setTimeout(() => { console.log(count); }, 1000); };}
const counter = createCounter();counter();counter();counter();What will be the output after 1 second?