When we write JavaScript, one of the most important (and often confusing) topics is scope. Knowing how scope works helps you avoid bugs, write cleaner code, and understand how JavaScript engines execute your programs.
In this article, we’ll break dow...