6
THE SECRET LIFE OF OBJECTS
Chapter 4 introduced JavaScript’s objects as containers that hold other data. In programming culture, object-oriented programming is a set of techniques that use objects as the central principle of program organization.
Though no one really agrees on its precise definition, object-oriented programming has shaped the design of many programming languages, including JavaScript. This chapter describes the way these ideas can be applied in JavaScript.
Abstract Data Types
The main idea in object-oriented programming is to use objects, or rather types of objects, as the unit of program organization. Setting up a program as a number of strictly separated object types provides a way to think about its structure and thus to ...
Get Eloquent JavaScript, 4th Edition 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.