Intro
Objects are variables that can store both values and functions.
Values are stored as key:value pairs called properties.
Functions are stored as key:function() pairs called methods
Object Example
const car = {
type: "Fiat",
model: "500",
color: "white"
};
An object literal "literally" describes an object using a concise syntax with zero or more key:value pairs inside curly braces to describe all the object properties:
{firstName:"John", lastName:"Doe", age:50, eyeColor:"blue"}
Top comments (0)