0

javascript 怎样删除对象属性?

helen created at5 years ago view count: 2403
report
回复
0

使用delete删除变量或者对象的属性。

var object_test = {
    "key1": "233",
    "prop2": "123"
};
delete object_test.key1
delete object_test["key1"]
console.log(object_test);
5 years ago 回复

Recent search keywords