Object in Javascript are “name value pairs” and this name value pairs are called Object Properties
for Example :
person is Object which has two properties name and place
setting property
getting property
There are three way to create object in Javascript
- using an object literal
- using new keyword
- inheriting Object.prototype
Everything in Javascript is Object
Everything in Javascript is Object except primitive values
primitive values are strings, numbers, true, false and undefined.
Dates are always objects
Arrays are always objects
Functions are always objects
No comments:
Post a Comment