In contrast to the native Object.getPrototypeOf, this function does not throw when provided null or undefined. Instead, similar to when provided any value with no inherited properties, the function returns null.
Value arguments other than null or undefined are coerced to objects.
Returns the prototype of a provided object.
Notes
Object.getPrototypeOf
, this function does not throw when providednull
orundefined
. Instead, similar to when provided any value with no inherited properties, the function returnsnull
.null
orundefined
are coerced to objects.