function say667() {
console.log(1);
// Local variable that ends up within closure
var num = 666;
var sayAlert = function() {
console.log(num);
}
num++;
return sayAlert;
}
say667();
为什么这不起作用?它 consolelogs1
但不 console.log num
。