Solution Review: isPrototypeOf

This lesson will explain the solution to the problem in the previous lesson.

Solution #

Press + to interact
function isPrototype(){
var obj1 = {x: 1};
var obj2 = Object.create(obj1)
console.log(
obj1.isPrototypeOf(obj2)
);
}
isPrototype()

Explanation

...

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.