The ECMAScript standard describes a script as a collection of source elements and optional function declarations.
Any statements that are not part of a function body are considered to be part of the global code. The statements encountered as part of the global code are executed as they are parsed. Any statements that are inside a function body are simply stored and deferred for execution until the function is actually called.
Prev | Home | Next |
screenY | Up | Script execution |
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. |