SOURCE

class A{
    constructor(){
        this.a="a";
    }
    print(){
        console.log(this.a);
    }
}

class B extends A{
    constructor(){
        super();
        this.a="b"
    }
}

let a  = new A();
a.print();

let b= new B();
b.print();

function ck(cls){
  console.log(b instanceof cls);
} 

ck(B);
console 命令行工具 X clear

                    
>
console