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);