创建一个对象: var dash={name:"孙悟空",age:500};
var dash={name:"孙悟空",age:500};
访问:alert(dash.name);
alert(dash.name);
添加:dash.weapons="jgb";
dash.weapons="jgb";
删除:delete dash.age;
delete dash.age;
多词元素名:"gold cudgel":true; 不同的获取元素方式:alert(dash["gold cudgel"]);
"gold cudgel":true;
alert(dash["gold cudgel"]);