// Object.getPrototypeOf() method of JavaScript returns the prototype (i.e. the value of the internal [[Prototype]] property) of the specified object.
// Object.getPrototypeOf(obj)
let animal = {
eats: true
};
// create a new object with animal as a prototype
let rabbit = Object.create(animal);
console.log(Object.getPrototypeOf(rabbit) === animal); // get the prototype of rabbit
Object.setPrototypeOf(rabbit, {}); // change the prototype of rabbit to {}