Chapter 8
Objects
Key Skills & Concepts
    Defining Objects
    Creating Objects
    Using Prototypes
    Object Statements
    Understanding Predefined JavaScript Objects
image
Objects provide you with even more flexibility in your scripts. They can be used as another way to store data, or can be used to create reusable structures. In this chapter, you will learn what JavaScript objects are, how to create objects, and how to make use of some of the predefined objects.
Defining Objects
Since JavaScript is a prototype-based language, objects work differently than they do in class-based languages.
JavaScript objects are basically a collection of ...

Get JavaScript: A Beginner's Guide, Fourth Edition, 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.