Is it posible to access the variable defined in parent function without creating the handler for it ?
So basically what i need is something like below.
var g=100;
(function f()
{
var g=200;
(function()
{
var g=300;
console.log(g); //300
console.log(window.g); //100
console.log( ?? ) // how should i get value of g as 200 here ??
})();
}();
Please note here that i dont want to create handler here. If i have only one function, and i want to access parent variable(same varible present in the current function) inside the function then i can use window.[variablename]