Chapter 9

Getting Oriented with Classes

IN THIS CHAPTER

Bullet Harnessing the power of abstraction and encapsulation

Bullet Getting classy with inheritance and polymorphism

Bullet Deriving classes from base classes

Bullet Constructing constructors

Bullet Tuning in to static properties and methods

Bullet Calling your parents is super()

Bullet Declaring public and private fields

Bullet Honing in on some fine points about arrow functions

“They can do without architecture who have no olives nor wines in the cellar.”

—HENRY DAVID THOREAU

Like constructor functions, classes are templates for objects. At their core, they're built on prototypes (which you can read about in Chapter 6). But their syntax and capabilities go beyond what's available ...

Get JavaScript All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.