how to check if an object is a certain class code example
Example 1: js class check if new instance
new Date() instanceof Date; // => true
Example 2: how to check which class a object is from
if (obj instanceof C) {
//your code
}
new Date() instanceof Date; // => true
if (obj instanceof C) {
//your code
}