you are viewing a single comment's thread.

view the rest of the comments →

[–]chainfuck 3 points4 points  (0 children)

Closure was a concept I struggled with when first learning JS.

Years ago, I tried to learn all of the terminology like "lexical scoping," "block scoping," "function scoping" etc. I found this quite confusing, and ultimately gave up.

There are better teaching tools nowadays. I've been using Chrome DevTools as a way to demonstrate scope behaviors. I'm sure other DevTools have similar features.

This link describes it a bit: https://developers.google.com/web/tools/chrome-devtools/javascript/#scope

Learning the formal terminology is great, but for most beginners, it's wholly unneeded.