Just a few weeks until the 2021 JavaScript Full-Stack Bootcamp opens.
Signup to the waiting list!


Returns the prototype of an object.

Usage:

Object.getPrototypeOf(obj)

Example:

const animal = {}
const dog = Object.create(animal)
const prot = Object.getPrototypeOf(dog)

animal === prot //true

If the object has no prototype, we’ll get null. This is the case of the Object object:

Object.prototype //{}
Object.getPrototypeOf(Object.prototype) //null


The 2021 JavaScript Full-Stack Bootcamp will start at the end of March 2021. Don't miss this opportunity, signup to the waiting list!

More js tutorials: