Introduction to JavaScript Objects
JavaScript·2 min read·Jan 1, 2026
In JavaScript, an object is a dynamic data structure that contains a collection of related data and complex entities in the form of key-value pairs called properties.
These values include all primitive data types, objects, arrays, functions, and regular expressions.
Objects are commonly used to:
- Group together multiple values into a single entity.
- Create models of real-world entities, such as users or products.
- Bundle multiple functionalities together to improve code reusability.
- Create complex data structures that can easily be manipulated by APIs.
Learning objectives
In this module, you'll learn how to work with objects: how to declare them, how to read and update properties, and how to combine objects to create new ones.
This is a major step toward writing real Node.js programs, because most non-trivial applications rely on objects to represent configuration, payloads, database records, and API responses.
After completing this module, you will be able to:
- Create object literals and structure related data into properties.
- Access object properties using the dot notation, optional chaining, and computed keys.
- Update and delete object properties safely.
- Work with numbers beyond basic arithmetic by converting values and using the Math library.
- Destructure object properties to extract only the values you need.
- Merge object literals to create new objects without rewriting properties.
- Read and write JSON objects and understand how they map to JavaScript objects.