function A() {};
function B() {};
function C() {};
B.prototype = Object.create(A.prototype);
B.prototype.fn = function () { console.log(this); };
C.prototype = Object.create(B.prototype);
var c = new C();
c.fn(); //C {fn: function} VM1188:2
c instanceof C; // true
c instanceof B; // true
c instanceof A; // true
var a = new A();
a.fn; // undefined