Easy
What will the following code output to the console, and why?
1function createCounter() {2 let count = 0;3 return {4 increment() {5 count++;6 },7 getCount() {8 return count;9 }10 };11}1213const counter1 = createCounter();14const counter2 = createCounter();1516counter1.increment();17counter1.increment();18console.log(counter1.getCount());19console.log(counter2.getCount());