a.变量类型 变量类型 构造函数 举例 类型检测typeof 字符串 function String() var t = "chua"; var m = new String("chua"); "string" 数字 function Number() var t = 12; var m = new Number(12); "number" 布尔 function Boolean() var t = false; var m…
js中的对象分为两种:普通对象object和函数对象function. function fn1(){}; var fn2 = function(){}; var fn3 = new Function(); var fn4 = Function(); var obj1 = new fn1(); var obj2 = {}; var obj3 = new Object(); var obj4 = Object(); console.log(typeof fn1);//function consol…