Closures are interesting and helpful. In short, closure is a function that can be exposed to the outside world that captures part of its external environment, even though the environment could be private to outside world.
End of side note
Your task here is not only to explain the behavior (easy part) but also correct the inner loop of the constfuncs method so that the code outputs
More specifically, you are allowed to modify only this line of code