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
2.1m questions
2.1m answers
60 comments
57.0k users