Demystifying Prototype In JavaScript


First thing you need to understand with JavaScript is that there is no such thing as classes(ignoring the ES6 spec). JavaScript is filled with an endless sea of objects. Objects are linked to each other, the idea of classes is a mere design pattern that can be implemented via mixins. I'll cover the fundamentals of OO JavaScript in a future post but I just wanted to preface this topic by setting the stage clear on where JavaScript stands in regards to classes.

JavaScript descendants

At the heart of it, all JavaScript objects descend from