Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 214 Bytes

inheritance.md

File metadata and controls

20 lines (13 loc) · 214 Bytes

Inheritance

ES6+

class Parent {}

class Child extends Parent {}

Before ES6

function Parent() {}

function Child() {}

Child.prototype = new Parent();
Child.prototype.constructor = Child;