Pulkit Gaur

dream - do - deserve

Javascript global variables

Filed under: Javascript at 23:43:14 On 2006-06-08

Discovered something which i should have figured out earlier.

window.myvariable = some_value;

is same as a global variable declared like

 

................

................

var some_value;

function foo(){

............

}

 

Strange but true wink

 

2 Comment(s) | Add your own



Leave a Comment

Required

Required, hidden