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

Get hands-on with 1400+ tech skills courses.