## **遍历删除对象属性**
```
var obj={
age:18,
name:'yc',
sex:'男',
sayHi:function () {
console.log('Hi');
}
};
// for in可以遍历对象的成员
for (var key in obj){
console.log(key+'---'+obj[key]);
}
var o={};
for (var i=0 ;i<10;i++){
o['a'+i]=i*2;
}
for (var key in o){
console.log(key+'---'+o[key]);
}
//删除属性
delete o.name;
delete o.sayHi();
```