The object is a single entity with various values and methods. A single object can access various values and methods in its scope.
Eg. Object name = car
Properties = color, price, model, size.
Methods = start(), drive(), stop(), break().
Here in the above example, the object car has different values, and it can access all the methods in its scope.
const person {
Firstname: “Ram”,
Lastname: “Kapoor”,
Age: 30,
Education: “Engineering”
};
Here the object person has properties like age, name, education, which we can access using the object person.
We can access the properties using object.property.
Eg. person.age; // this will return the value of age property.
Knowledge2life learning website
Online website Knowledge2life