Skip to content

2620. Counter 👍

1
2
3
4
5
function createCounter(n: number): () => number {
  return function () {
    return n++;
  };
}