When I test this code snippet in jsFiddle with JSLint, it gives me this strange warning:
Problem at line 3 character 10: Cannot set property 'first' of undefined
But if I declare the variable currentNumber outside of (i.e. before) the for-loop, it doesn't complain.
What is the reason of this?