javascript-faq

How closures work in JavaScript

As Albert Einstein said: If you can't explain something to a six-year-old, I don't think you quite understand it yourself. ... sures (functions, variables, scope, etc.), except, in fact, closures? This question is translated from English-language SO.

I study JavaScript and when I run the code, the tab gives an error out of memory, but there is enough memory

The code is only 20 lines long and when you run it, it gives an error about a lack of memory, I have 4GB of RAM previously th ... o var years? I didn't understand this point, the video explains it but unfortunately I didn't fully understand it. Thank you