Object Prototype Extensions and Super Calls

get and set the prototype of an object, using the 'super' keyword to make code more concise

The Object API has been extended with two methods to get and set the prototype of an object:

  • Object.getPrototypeOf(o) returns the prototype of o
  • Object.setPrototypeOf( o, proto ) sets the prototype of o to proto

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.