1、 typeof----检测给定变量的数据类型 typeof 123 "number" typeof '123' "string" typeof false "boolean" typeof undefined "undefined" typeof {} "object" typeof [] "object" typeof null "object" // 因为null值表示一个空对象指针 注意: undefined派生自null值,因此 null===undefined 是true