In JS almost every thing is object.A variable is object,a function is object,Date is object,boolean is object,array,regex,maths are all object.
However the primitive value variables are not object.
The v is a variable of type string.
Is it an object too?
No, because it is a primitive variable.
Don’t get confused, a variable can have only one value while a object can have many values.
Objects are variables too but can contain multiple value.
It has name:value pair separated by colons.
The name,age are called properties.
1. Using an Object Literal
Just as the above example.
2.Using keyword ‘new’.
3. Using an Object Construct
In the above two ways of creating object, we can create a single object.Sometimes we need to create many object of one type.In such case this method…
View original post 104 more words