Hacker News new | ask | show | jobs
by nadinengland 4572 days ago
Closure 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.

1 comments

Thanks!

I think that I will stick with this: "You should stick with the simple stuff from now on. Capisce?"