Not all functions are created using the constructor Function. instanceofchecks if the given item was actually created by this particular function.
You get a similar effect in a browser environment when working with multiple windows. I mean, if you have a function fooin window A:
function foo(arg) {
if (arg instanceof Array) {
}
}
... and you have the code in another window B that calls it:
opener.foo([]);
... , foo , arg - , ? , arg , Array , foo.
, : , ?
( ), . , ... ... ... ... , .
. , __proto__ JavaScript.