6 ms·
I understand first and second example, but not the third. Someone care to explain? You can assign value for card but no read at the same line? Once I though t
by kelmop 13y ago
I understand first and second example, but not the third.
Someone care to explain?
You can assign value for card but no read at the same line?
Once I though that I understand something but I was wrong :)
- nadinengland 13y agoClosure allows you to capture references to variables, not objects. The function may reference the variable `card` but by the time the first one is triggered the for-loop had already decremented the variable to 0.
- kelmop 13y agoThanks! I think that I will stick with this: "You should stick with the simple stuff from now on. Capisce?"