Challenge 2 — Solution Task: Write a function makeIdGenerator() that returns a function with no parameters, returning a new sequential ID each time it's called (starting at 1). Create two SEPARATE generators and call each one a few times to prove their counts don't interfere with each other. function makeIdGenerator() { let nextId = 1; return function () { const id = nextId; nextId++; return id; }; } const generatorA = makeIdGenerator(); const generatorB = makeIdGenerator(); console.log(generatorA()); // 1 console.log(generatorA()); // 2 console.log(generatorB()); // 1 console.log(generatorA()); // 3 console.log(generatorB()); // 2 Expected output: 1 2 1 3 2 Notes: - generatorA and generatorB each came from their own separate call to makeIdGenerator(), so each one closes over its own private nextId variable — generatorB starting at 1 again, completely unaffected by generatorA already being at 2. - Interleaving the calls (A, A, B, A, B) demonstrates the two counters are genuinely independent, not just coincidentally starting from the same number. - nextId is never accessible from outside either generator function — there's no way to read or reset it directly, only by calling the generator itself.