Last Updated: February 25, 2016
· markdalgleish

A Touch of Class: Inheritance in JavaScript

The object-oriented features of JavaScript, such as constructors and prototype chains, are possibly the most misunderstood aspects of the language. Plenty of people who have been working full time with JavaScript still struggle with these concepts, and I argue that this is purely a result of its confusing, Java-style syntax.

But it doesn't have to be this way. Hiding beneath the "new" keyword is a rich and elegant object model, and we'll spend some time coming to grips with it.

By seeing how simple inheritance in JavaScript can be if we use more modern syntax, we'll be able to better understand the unfortunate syntax we've been stuck with from the beginning.

Read more:

1 Response
Add your response

Just FYI: :)
Good blog post!

over 1 year ago ·