1. 'name' in object
console.log('height' in tels);
既可以检测这个属性是否是对象的私有属性又可以检测是否还对象的公有属性
2. tels.hasOwnProperty
console.log(tels.hasOwnProperty('height'));
只有检测时候是对象的私有属性利用原型链的不是
console.log('hasOwnProperty' in tels);
console.log('height' in tels);
既可以检测这个属性是否是对象的私有属性又可以检测是否还对象的公有属性
console.log(tels.hasOwnProperty('height'));
只有检测时候是对象的私有属性利用原型链的不是
console.log('hasOwnProperty' in tels);