tag : inheritance

JavaScript Prototypal Inheritance and What ES6 Classes Have to Say About It

Many people come to JavaScript from other object-oriented programming languages such as Java or C++ and are confused as heck. “Where are the classes?” Well JavaScript doesn’t have classes. Rather, JavaScript uses prototypal inheritance to create something similar to classes. Though it is somewhat similar, it’s still quite different and takes a lot of work to understand. That’s the purpose of ES6 Classes.

JavaScript Fundamentals: Functions

In JavaScript, functions are an integral part of development. They are what contain all of our amazing functionality (hence the name function) and run it whenever we deem worthy. With functions we can make code nonlinear, more organized, and easier to understand. We can also do some crazy stuff with functional programming.

JavaScript Mixins for Functional Inheritance

Mixins are a way to add the functionality of 1 or more objects to a new object, essentially creating a non-standard means of inheritance. This inheritance is also done functionally, which is the way JavaScript seems to like having things done. Basically all we’re doing is reusing functions without the need for the standard inheritance model.