Object - JavaScript

A JavaScript object gives you the ability to store multiple related variables in the same…

What is an object in JavaScript?

A JavaScript object gives you the ability to store multiple related variables in the same container. Values in an object are stored using key:value pairs.

Unlike an array, the variables are not necessarly a list of the same variable types. Instead, variables in an object are logically related.

let person = {
    firstName: "Jared",
    lastName: "Brown",
    age: 32
}

Level: Apprentice · More JavaScript terms at this level

Updated