So if you look at this fiddle / you can see that
var me = { fName: "ken", lName: "n" };
console.log(Object.prototype === Object.getPrototypeOf(me));
returns true. Why doesn't
console.log(Object.prototype === me.prototype);
Given that I created the "me" object as an object literal sure enough it's prototype should be Object.prototype and the first line would seem to confirm that.
So if you look at this fiddle http://jsfiddle/r0k3t/z8f2N/1/ you can see that
var me = { fName: "ken", lName: "n" };
console.log(Object.prototype === Object.getPrototypeOf(me));
returns true. Why doesn't
console.log(Object.prototype === me.prototype);
Given that I created the "me" object as an object literal sure enough it's prototype should be Object.prototype and the first line would seem to confirm that.
Object.prototype === me.constructor.prototype; // true
I let you guess now how getPrototypeOf
works :-)
Also, the non-standard-yet-but-works-almost-everywhere solution (thanks jAndy):
Object.prototype === me.__proto__; // true