Identifiers are resolved by binding the name to the value container through the scope chain.
A hierarchical access mechanism adds items to the front of the scope chain as code is nested. The most local variable object belonging to the current execution context is searched first. If the name is not resolved, then the scope chain is walked until a matching name is located or the global code's execution context is reached. If there is still no match, then the undefined value is returned.
An identifier is considered to be a primary expression when it is being evaluated.
See also: | Binding, Completion type, Execution context, Primary expression, Scope chain, with ... |
ECMA 262 edition 2 - section - 10.1.4
ECMA 262 edition 2 - section - 11.1.2
ECMA 262 edition 3 - section - 10.1.4
ECMA 262 edition 3 - section - 11.1.2
Prev | Home | Next |
Identifier | Up | Identity operator |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |