How to check if a Javascript Class inherits another (without creating an obj)?

前端 未结 5 560
别那么骄傲
别那么骄傲 2020-11-29 03:12

Eg:

function A(){}
function B(){}
B.prototype = new A();

How can I check if the class B inherits class A?

5条回答
提交回复
热议问题