如果我在使用 Spidermonkey 1.8 的 JSDB 1.8 中执行此操作:
this.x = 3;
var y = 4;
function z() { return 77; }
this.w = function w() { return 44; }
this.v = function v() { return 55; }
w = function w() { return 66; }
function v() { return 77; }
delete x;
delete y;
delete z;
delete w;
delete v;
我true
从delete x
anddelete w
线得到,但从false
and delete y
anddelete z
线得到delete v
。
这里发生了什么,这种行为是在 ECMAscript 标准中还是在 Spidermonkey 中定义的?我想从特定范围中删除一个函数,但发现我做不到。