GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing javascript.info — Is variable visible? back to the lesson Is variable visible?importance: 4 What will be the result of this code?
P.S. There’s a pitfall in this task. The solution is not obvious. The result is: error. Try running it: In this example we can observe the peculiar difference between a “non-existing” and “uninitialized” variable. As you may have read in the article Variable scope, closure, a variable starts in the “uninitialized” state from the moment when the execution enters a code block (or a function). And it stays uninitalized until the corresponding In other words, a variable technically exists, but can’t be used before The code above demonstrates it.
This zone of temporary unusability of a variable (from the beginning of the code block till |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |