通过var声明的变量delete不能删除,但是它也是window的属性啊?求解释
var foo = 1;
window.bar = 2;
delete foo;
delete bar;
console.log(window.foo,window.bar)//1 undefined
慕斯709654
相关分类