It is easy (but not recommended) to check if an instance is specific subclasses:
class Human {
constructor(){
console.log(this instanceof Person);
}
}
To check if this is an instance of a base class (and not a subclass), you can use:
Object.getPrototypeOf(this) === Human.prototype
[until you mess up with the class and rewrite the object prototype]
this.constructor.name - - , , .