in 操作符会向上查找原型链
* hasOwnProperty 只会检查当前对象不查找__proto__
let o = {
name: 'fj',
age: 18
}
/**
* in 操作符会向上查找原型链
* hasOwnProperty 只会检查当前对象不查找__proto__
*/
console.log('age' in o); // ture
console.log('valueOf' in o); // ture
o.hasOwnProperty('age') // true
o.hasOwnProperty('valueOf') // false