数据类型 function
//1.1 typeof 来检测函数类型
function test1(){
console.log("呵呵");
}
console.log(typeof test1); //function
//1.2 instanceof
console.log(test1 instanceof Function); //true
//1.3 Object.prototype.toString.call();
console.log(Object.prototype.toString.call(test1)); // "[object Function]"
更多专业前端知识,请上 【猿2048】www.mk2048.com