typeof运算符和Object.prototype.toString
typeof {foo: 'bar'};
// "object"
typeof ['foo', 'bar'];
// "object"
typeof "foobar";
// "string"
typeof /foo|bar/;
// "object"
Object.prototype.toString.call({foo: 'bar'});
// "[object Object]"
Object.prototype.toString.call(['foo', 'bar']);
// "[object Array]"
Object.prototype.toString.call("foobar");
// "[object String]"
Object.prototype.toString.call(/foo|bar/);
// "[object RegExp]"