JavaScript Wiki

Scope is fascinating (and sometimes confounding) in JavaScript.

Because debugging mysteries are often rooted in the ambiguity of scope, it is best to get a good understanding of it early.

Context[]

Scope can be defined spacially as the reach of a variable.

How available/global or privileged/private is it?

Where/when is a key to... ...

Heritage[]

Scope can also be seen as the lineage of an object.

Prototype chains are like family trees.

What does it come from...