Checking class inheritance with Object.getPrototypeOf

We've seen how to check for inheritance and identity of the instantiated class as a Boolean expression. We might want to also see the full ancestry of an instance at once. In this recipe, we'll see how to do just that.

Get ECMAScript Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.