Verificar el objeto es instancia de clase
class Person
{
constructor(firstName, lastName)
{
this.firstName = firstName;
this.lastName = lastName;
}
}
function test()
{
const p = new Person();
console.log(p instanceof Person);
}
Javasper