2620. Counter ¶ TypeScript 1 2 3 4 5function createCounter(n: number): () => number { return function () { return n++; }; } Was this page helpful? Thanks for your feedback! Thanks for your feedback! Help us improve this page by using our feedback form.