Objects In JavaScript
May 25, 2021
Key/Value
In the object we will describe diferent aspects of our animal like its color its height its weight. These aspects are called keys and give them a value we speak of :
key-value
Example
Generality
Objects are used to model real world objects,we want to represent in our program.
In Javascript an object will be stored in a variable and written between curlybraces. { }
Access to values
To access a value nothing could be simpler.. :)
Modify object
Functions
we can add functions to the objects (we speak of a method to use the data)