1、遍历对象的属性
var obj = {};
obj.name = "laing";
obj.age = 13;
obj.sex = "男";
for (var attr in obj){
alert(attr);
}
2、删除对象属性方法
delete不能删除基础数据类型
var a = 4;
delete a;
console.info(a);//4
1、遍历对象的属性
var obj = {};
obj.name = "laing";
obj.age = 13;
obj.sex = "男";
for (var attr in obj){
alert(attr);
}
2、删除对象属性方法
delete不能删除基础数据类型
var a = 4;
delete a;
console.info(a);//4