hasOwnProperty 只能判断是否是属于自身的属性,无法找到原型身上的属性(只在属性存在于实例中时才返回true)`
let person = {
name: '小狗'
}
console.log(person.hasOwnProperty('name')) // true
console.log(person.hasOwnProperty('hasOwnProperty')) // false
console.log('name' in person) // true
console.log('hasOwnProperty' in person) //true