Scope Chain

noun

say it: “SKOHP chayn” /skoʊp tʃeɪn/

The path JavaScript follows to find a variable: it looks in the current scope first, then in each scope around it, out to the global scope.

What is Scope Chain in JavaScript?

Scope Chain — The sequence of lexical environments searched to resolve a name.

In a sentence

  • “The inner function had no taxRate of its own, so the scope chain led JavaScript out to the one at the top of the file.”

Level: Master · More JavaScript terms at this level

Updated