let xj={name:"xiangjun"};
console.log(xj);
console.log(xj.hasOwnProperty("name"));

//完全数据字典对象
let hd2=Object.create(null,{
    name:{value:"houdunren"}
})
//没有原型的对象也是存在的
console.log(hd2.hasOwnProperty("name"));//axioshtml.html:724 Uncaught TypeError: hd2.hasOwnProperty is not a function

 

posted on 2022-01-24 22:53  weakup  阅读(27)  评论(0编辑  收藏  举报