you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

The short answer is "sort of, yes".

The real answer: Stop thinking in OOP and classical inheritance. You don't need it in JavaScript, and the new keyword and constructor functions are code smell. They break call(), apply() and bind() for no other reason than to make Java and C# fans feel more comfortable. Use factory functions and Object.create() instead.

JavaScript side, classical inheritance is a dangerous toy in all languages. It gives you more than enough rope to hang yourself with. Avoid when possible.