Wednesday, December 3, 2014

Object in Javascript

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

  1. using an object literal

         

  1. using new keyword

        

  1. 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
Objects are objects


See the link of examples
Object in Javascript
Type of operator

No comments:

Post a Comment