Reflect.getPrototypeOf()
TheReflect.getPrototypeOf() method returns the prototype of an object.
It is similar toObject.getPrototypeOf().
Syntax
Reflect.getPrototypeOf(obj)
Parameters
| Parameter | Description |
|---|---|
| obj | Required. The target object. |
Return Value
| Type | Description |
|---|---|
| Object | The prototype of the given object (can be object or null). |
Errors
| Type | Description |
|---|---|
| TypeError | Thrown if obj is not an object. |
Reflect Methods:
Reflect.apply()
Reflect.construct()
Reflect.defineProperty()
Reflect.deleteProperty()
Reflect.get()
Reflect.getOwnPropertyDescriptor()
Reflect.getPrototypeOf()
Reflect.has()
Reflect.isExtensible()
Reflect.ownKeys()
Reflect.preventExtensions()
Reflect.set()
Reflect.setPrototypeOf()
Browser Support
Reflect.getPrototypeOf() is an ECMAScript6 (ES6 2015) feature.
JavaScript 2015 is supported in all browsers sinceJune 2017:
| Chrome 51 | Edge 15 | Firefox 54 | Safari 10 | Opera 38 |
| May 2016 | Apr 2017 | Jun 2017 | Sep 2016 | Jun 2016 |

