
This operator walks the prototype chain of the RHS value and looks for a "prototype" property with the same value as the prototype of the LHS. This is pretty cool. :^)
7 lines
108 B
JavaScript
7 lines
108 B
JavaScript
function Foo() {
|
|
this.x = 123;
|
|
}
|
|
|
|
var foo = new Foo();
|
|
if (foo instanceof Foo)
|
|
console.log("PASS");
|