Chapter 7Working with Classes
Older versions of JavaScript supported classes but without using the class keyword. In the past, you may have found object-oriented (OO) programming in JavaScript rather primitive, especially if you were familiar with other mainstream languages. Even today, many programmers still think that JavaScript has little to do with OO programming. One of the main reasons for that is that the old syntax and semantics of working with classes were very confusing and error-prone. Modern JavaScript puts an end to that misery; now it is possible to create beautiful OO code with JavaScript.
In this chapter you’ll learn all about creating classes and defining both instance and static members. You’ll quickly find that the new syntax ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access