cachaito
12/28/2013 - 4:20 PM

Do sprawdzenia #3

function Cat(name){ this.name = name; }

function Person(name) { return new Cat(name); }

var bob = new Person('Bob');

bob instanceof Person //false

bob instanceof Cat //true