Note 4 : Object
Previously we have seen all types of primitive types. now let see reference types. Object: It is the collection of highly related variables or can say a group of highly related variables is known as an object. here is the basic syntax of an object. If we want to access any property of an object we can use DOT. like here for example, if we want to access name we can simply write "person.name". another way is to access any property of an object is using Bracket Notation. like person["name"]. Something Advance about the Objects: so we can encapsulate highly related key-value pairs together in an object. we can declare an object with object literal syntax. and inside them, we can add one or more key-value pairs. in the object, we store highly related properties. in the object, we have key-value pairs. and in the value, we can store anything we want so I can say value can be anything. it can be a number, a string, a boolean or it can be null, it can be undefined, it can ...