2620. Counter ¶ TypeScript 1 2 3 4 5function createCounter(n: number): () => number { return function () { return n++; }; }