1There are two ways to declare an objectlet obj1 = {"name": "hfx"."age": 18}

let obj 2 = new Object({"name": "hfx"."age": 18})



2How do I delete an object's attributesdelete obj.name

delete obj['name']


3How to view object properties view yourselfconsoleDir (obj) to check the keyObjectKeys (obj1) to check the valueObjectValues (obj1) View the key valueObject.entries(a)
 
4How to modify or add object property obj.name ="sad"

obj['sex1'] = "asd"Batch change yourselfObject.assign(obj1,{"sex": "Male"}) prototype modification:let obj = Object.create(common) determines that a property is its own and the common obj.hasOwnProperty('toString'Check if obj1 has an attribute name"name" in obj1 

Copy the code