Objects in programming

Objects in programming are just like the objects in real life. They have properties and methods. Take the example of a television. Its properties include color, resolution, price etc. and methods include muting the sound, increasing the volume, changing the brightness etc. Properties are the description of an object and methods are functions relating to the object.

This example shall be enough to explain objects in JavaScript or even any other programming languages. Objects in programming are used to model objects in real life. They are also used to model unrealistic objects like tools in graphic designing softwares and sometimes certain tasks too.

Objects serve to store data under one name (like tv) that can be classified as either properties or as methods depending on the type of data as you will see.