Medium
What will the following function output when called, and why?
1function createCounter() {2 let count = 0;3 return {4 increment: () => count++,5 getValue: () => count,6 };7}89const counter = createCounter();10counter.increment();11counter.increment();12console.log(counter.getValue());