Sample Video Frame

Created by Zed A. Shaw Updated 2024-02-17 04:54:36
 

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.

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:

Previous Lesson Next Lesson

Register for Learn JavaScript the Hard Way

Register today for the course and get the all currently available videos and lessons, plus all future modules for no extra charge.