Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on The world's smallest and fastest classical JavaScript inheritance pattern.
function inherits(child, parent) { function tmp() {}; tmp.prototype = parent.prototype; child.prototype = new tmp(); child.prototype.constructor = child; }
function A() { this.x_ = 5 }; function B() {A.call(this);};inherits(B, A);
There are no comments on this comment yet.
function inherits(child, parent) { function tmp() {}; tmp.prototype = parent.prototype; child.prototype = new tmp(); child.prototype.constructor = child; }
function A() { this.x_ = 5 }; function B() {A.call(this);};inherits(B, A);