#javascript-code-12-global.js / js
// A function in which the value of foo is set function test() { foo = "test"; } // Call the function to set the value of foo test(); // We see that foo is now globally scoped alert( window.foo == "test" );
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.