企业网站帮助中心/百度一下就知道百度首页
方法1:该方法不建议使用
let obj = {name: {a: 'f',b: 'fg'},hellio: {d:'vv',s:'cc'}
}console.log(obj.hasOwnProperty('hellio')); //true
推荐方法
// 推荐方法
const has = Object.prototype.hasOwnProperty;console.log(has.call(obj, 'hellio'));//true