codepath / nodejs_guides

Comprehensive open-source Node.js guides
76 stars 19 forks source link

JavaScript: Inheritance #14

Open CrabDude opened 9 years ago

CrabDude commented 9 years ago

MDN has superior material on this [1,2]. There's not much need to rehash it, but it might be worthwhile to provide some focused & simple examples of creating a class with inheritance, constructor, static and instance methods and properties and an equivalent prototypal example with Object.create.

Also see Babel's class example

This is a bit of an overloaded tricky subject. Let's try and avoid the controversy and provide simple recommendations and additional information for people to decide for themselves.

What success looks like: Succinctness and clarity. Less is more. Reference Wikis: Authentication & Authorization, Setup

Open separate issues for required links to community sources if you're having trouble finding any.

Please assign to yourself before working on this. /cc @NinjaSudo @philster @azoff @DiyahM