let obj = new Object()
let obj = {"name":"lfy,"age":18};
obj["sex"]="男" /*方法1*/
obj.sex="男" /*方法2*/
方法慎重使用方法2
let obj = new Object()
let obj = {"name":"lfy,"age":18};
obj["sex"]="男" /*方法1*/
obj.sex="男" /*方法2*/
方法慎重使用方法2