为什么"numMyNumber"没有出现在Object.getOwnPropertyNames中?
在Firefox中使用FireBug控制台.
"use strict";
// MyFunction
function MyFunction() {
var numMyNumber = 10;
return numMyNumber;
}
// ["prototype", "length", "name", "arguments", "caller"]
// Why does numMyNumber not appear?
console.log(Object.getOwnPropertyNames (MyFunction));
// 10
console.log(MyFunction());
Run Code Online (Sandbox Code Playgroud) javascript ×1