class ParentClass {}
class ChildClass {}
ChildClass.prototype instanceof ParentClass
Checking for ancestry without having an instance of the child class, just a reference to the class itself.
Search
July 25, 20241 min read
class ParentClass {}
class ChildClass {}
ChildClass.prototype instanceof ParentClass
Checking for ancestry without having an instance of the child class, just a reference to the class itself.