December 2023
Beginner to intermediate
330 pages
5h 27m
English
Functions and classes are what we use to wrap certain pieces of functionality into reusable blocks. By using a function or class, we can repeat specific tasks many times without having to rewrite the code. When JavaScript was originally released, it only had functions and used prototypes for inheritance. We covered this type of inheritance when we looked at objects.
Classes came later to JavaScript, but they are largely just syntactic sugar for prototype-based inheritance. As such, many developers in JavaScript choose ...