var a = 3;
console.log(typeof a); // number
var b = "Hello";
console.log(typeof b); // string
var c = {};
console.log(typeof c); // object
var d = [];
console.log(typeof d); // object
var e = false;
console.log(typeof e); // boolean
陣列回傳也是 object 如果要檢驗是否為陣列時可用
var d = [];
console.log(typeof d); // object
console.log(Object.prototype.toString.call(d)); // [object Array]