var mString = new String('A');
console.log(typeof mString); // object
console.log(mString instanceof String); // true
console.log(mString instanceof Object); // true
console.log(mString.__proto__ === String.prototype); // true
console.log(mString.__proto__.__proto__ === Object.prototype); // true
现在,为什么呢?
console.log(String.__proto__.__proto__ === Object.prototype); // true
而不是
console.log(String.__proto__ === Object.prototype); // false
当沿着原型链向上查找时?
在String和Object原型之间有什么?
.__proto__
getter。请改用Object.getPrototypeOf
。 - Bergi