2020年大前端面试题库+答案(第3章) javaScript判断对象类型

typeof 只能判断区分基本类型,如:number、string、boolean、undefined和object、function typeof 0; //number typeof true; //boolean typeof undefined; //undefined typeof "hello world"; //string typeof function(){}; //function typeof null; //object typeof {}; //...