Objects are like a group of functions that together have a greater purpose.
E.g: In real life, a car has a bunch of functionalities that together make them a car:
- A car can accelerate, break, turn on the engine, turn off the engine, etc.
- A car also has shared properties (not only functions), a car is
red with a
serial number with
4 tires and many other properties.
To access or set an object’s properties, you can do so in the following ways:
All rights reserved, 4Geeks LLC 2021. Read more about 4Geeks and what we are going here.