Distinguishing scope vocabulary

You are documenting nested functions in a programming language. Match each term to its description, distinguishing name lookup, competing declarations, retained environments, and variable occurrences not bound within a function expression.

Match each term
A.

A function together with access to the surrounding bindings needed by its body

B.

An inner declaration takes precedence over an outer declaration with the same name

C.

The rule that name resolution follows the nesting of declarations in source code

D.

A use of a variable that is not bound within the function expression under consideration

Closure

Shadowing

Lexical scope

Free variable occurrence

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Binding and Scoping Questions: