<script type="text/javascript">
//对象操作
//1.点语法
//2.数组关联语法
var obj ={}
//1.添加
obj.name='jack'
//对象[字符串]=值
obj['age']=18
console.log(obj)//{name: "jack", age: 18}
//2.删除
delete obj.name
delete obj['age']
console.log(obj) //{}
//3.修改
//原先有 就是修改、原先没有 就是添加
obj.age=25
obj['name']='rose'
console.log(obj) //{age: 25, name: "rose"}
//查
//直接使用
//obj.name
//obj['age']
console.log(obj) //{age: 25, name: "rose"}
console.log(obj.name) //rose
console.log(obj['age']) //25
</script>