为什么某些文字的返回实例是假的?
"foo" instanceof String //=> false"foo" instanceof Object //=> falsetrue instanceof Boolean //=> falsetrue instanceof Object //=> falsefalse instanceof Boolean //=> falsefalse instanceof Object //=> false// the tests against Object really don't make sense
[0,1] instanceof Array //=> true{0:1} instanceof Object //=> true
12.21 instanceof Number //=> false/foo/ instanceof RegExp //=> true
相关分类