22: More Complex OOP

The code from Exercise 21 works, but you'd be missing out on quite a few features of JavaScript OOP, and you don't receive any computation benefits. The JavaScript virtual machine will take advantage of your classes and potentially give you additional checks, potential optimizations, and other features. If you use your hand rolled "baby OOP" then you won't get any of these benefits.

This exercise is a video based exercise as it's much easier to see how these classes and objects work live. You'll enter in two code files and I'll walk through them in the video.

The Code

For this exercise you have two files to look at. First there's the code from the previous exercise but cleaned up so that you can compare it to the same code for this exercise:

Learn JavaScript Today

Register today for the Beginner Basics course and get the new releases by just paying the difference. There's also special discounts for existing customers when new courses are released.


Still Not Sure? Check out more curriculum!