When should I use instanceof vs isPrototypeOf() ?
Code:function A(){} function B(){} function C(){} B.prototype = new A(); C.prototype = new B(); var c = new C(); (c instanceof A); // true A.prototype.isPrototypeOf( c ); // true C.prototype.isPrototypeOf( c ); // true (c instanceof C); // true







Bookmarks