n=888function f1(){ var n =1; n=n*2; function f2(){ alert(n); } return f2; } var result=f1(); result(); console.log(n)
n=888function f1(){ n=n*2; function f2(){ alert(n); } return f2; } var result=f1(); result(); console.log(n)
var name = "The Window"; var object = { name : "My Object", getNameFunc : function(){ return this.name; } }; alert(object.getNameFunc());
var name = "The Window"; var object = { name : "My Object", getNameFunc : function(){ return function(){ return this.name; } } }; alert(object.getNameFunc()());
f = function() {return true;}; g = function() {return false;}; (function() { if (g() && [] == ![]) { console.log(1); f = function f() {return false;}; function g() { console.log(2); return true;} } })(); alert(f()); // true or false ?