Introduction to Objects

Learn the last data type we'll cover: objects. Objects are like arrays in that they group a set of information. They're more loose, however, and we interact with them differently. They're made up of key-value pairs.

Objects are another way to store a collection of values. While arrays keep everything ordered, objects provide a little more flexibility. They’re also a little harder to get the hang of.

Key-Value

An object is created with curly brackets {}. They’re made up of key-value pairs, also referred to as properties. Let’s start with an example.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy