So Meta I Can't Take It!


I am lost in this exercise, don't know what is going on, would someone please help me.
The code is working perfectly.

// what is this "Object.prototype" anyway...?

var prototypeType = typeof Object.prototype;


// now let's examine it!

var hasOwn =


Object     Object.prototype
  {}             {}

Class      Class.prototype
  {}             {}

Subclass   Subclass.prototype
  {}             {}

Instances of Object only inherit from (have access to methods and attributes of) Object.prototype.

Instances of Class inherit from Class.prototype AND Object.prototype

Instances of Subclass inherit from Subclass.prototype AND Class.prototype AND Object.prototype.


why do i have two times .hasOwnProperty in the last line


One is a method call, the other is the argument to the method call. We are using the method to verify that hasOwnProperty exists. Of course it will return true.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.