Overview
The Javascript object is a flexible data type that can contain any number of name value pairs.Objects are declared as two curly braces, with name value pairs inside. The following declares an object, named "obj" with two name/value pairs, the first called "number1" with a value of 10, and the second name "number2" with a value of 20.
You can access the values of an object by using the variable name, following by a dot, and then the property name. The following example adds the two numbers on the object together.
let obj = {
number1 : 10,
number2 : 20
}
let sum = obj.number1 + obj.number2
Try it!