While we've already touched `instanceof` it might be worth mentioning that it's actually nothing more than a lookup in the prototype chain; basically, `a instanceof b` checks if the object a has b.prototype as its prototype, or if it's the "prototype of the prototype", and so on.
This could lead to subtle problems, as in the following:
function Test() {}
var test = new Test()
test instanceof Test // true
Test.prototype = {foo: 42};
test instanceof Test // false
test.foo // undefined (since Test.prototype doesn't refer to the [[Prototype]] of test)