1var window.iAmGlobal = "some val"; //Global variable declaration with window.
2
3//Any place in other part of code
4
5function doSomething()
6{
7 alert(window.iAmGlobal); //I am accessible here too !!
8 //OR
9 alert(iAmGlobal); //I am accessible here too !!
10}