一、for...in...循环数组
for( var key in obj ){spa
console.log( key ) // 对象属性名prototype
}对象
二、hasOwnProperty原型链
obj.hasOwnProperty( key )原型
判断一个属性是否是对象自身的属性console
三、in循环
'key' in obj方法
判断一个属性是否是自身可用的call
四、instanceof
A instanceof B
看A对象的原型链上 有没有 B的原型
五、区别数组和对象的方法
instanceof
constructor
Object.prototype.toString.call( )