摘要: 初始化 var object={ "a": 1, "b": 2 } var object_assigned = {"a": 10, "b": 20} 属性更改 Object.assign(object_assigned, map_object) console.log(object_assigned 阅读全文
posted @ 2022-02-17 15:29 cc-31415926 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 预数据 var map_object={"a": 1, "b":2 } 遍历 for (const key in map_object) { console.log(key, ' - ', map_object[key]) } Object.keys(map_object).forEach((key 阅读全文
posted @ 2022-02-17 11:56 cc-31415926 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 预数据 var map_object={"a": 1, "b":2 } 判断key是否存在 console.log(map_object.hasOwnProperty('a')) console.log(map_object.hasOwnProperty('c')) console.log(Obje 阅读全文
posted @ 2022-02-17 11:55 cc-31415926 阅读(565) 评论(0) 推荐(0) 编辑