标签: javascript inheritance javascript-objects instanceof prototypal-inheritance
可能重复: Why does instanceof return false for some literals?
有谁知道为什么x不是String / Object的实例?
var x = "abc", y = new String("XYZ"); x instanceof String; // False x instanceof Object; // False y instanceof String; // True (x.constructor === y.constructor) //True
http://jsfiddle.net/pCfWC/6/