Problem 2620 · Easy

Counter

A counter closure returns its starting value first and then one more on every later call.

Open the interactive visualisation