jskatas.org Continuously Learn JavaScript. Your Way.

Reflect: Reflect.getPrototypeOf()

It returns the prototype of the given object.

Donate to NGO Julenka. Support Ukranians in need. Julenka is an NGO which my brother founded in 2011 to support Ukranian families and kids in need.

Reflect.getPrototypeOf returns the prototype

  • works like Object.getPrototypeOf
  • throws a TypeError for a non-object
  • a new Set() has a prototype
  • for a class, it is Klass.prototype
  • works also for an old-style "class"
  • an array has a prototype too