Eg:
function A(){} function B(){} B.prototype = new A();
How can I check if the class B inherits class A?
Try the following:
ChildClass.prototype instanceof ParentClass
1.4m articles
1.4m replys
5 comments
56.9k users