(function(x){
delete x;
//console.log(x);
alert(x); //6
})(1+5);
结果为6,是因为delete删除失败,delete只能删除通过for in访问的属性。
(function(x){
delete x;
//console.log(x);
alert(x); //6
})(1+5);
结果为6,是因为delete删除失败,delete只能删除通过for in访问的属性。