Search code examples
javascriptprototype

Why when I create an object the console says that its prototype is Object when it is Object.prototype in JS?


Why it says that it's [[Prototype]] is Object? Object is a Function object and the real prototype of obj is Object.prototype.


Solution

  • It says that its [[prototype]] (which you know is Object.prototye) "is an Object". No more no less. It does not imply that the value is the same as the global Object variable.