*Object *
object are varaiable which can store both
valuesandfunctionsvalue are stores as
key:valuesthis pairs is called properties.function are stores a
key:function()this pair is called a methodskey can be randomly name but values should proper
in values we can assign variables
ex:caretype:type;while in object we can use keyvaules as key or functionkeys.
we can use space in key but it should be only in string and in while print also should in string form
ex:console.log(car["type"])we can delete a particular properties use object.value
ex:delete car.pricewe can add properties after creating object
ex:car['discount'] = 250000;we can change the values of a properties by reassign the value
ex:car.price = 5000000;we can use function in the object and
this.

Top comments (0)