方法一: typeof 缺陷: typeof Array | Object | Function的结果都是function typeof 方法二: instanceof 方法三: Object.prototype.toString.call(‘需要判断的变量’)