Javascript Objects


Javascript Objects :-

An Objects is an un-arranged set of properties that may be accessed using dot [ . ] Operator.

Example of Object :-


Example : men with running Property;


Object are created using the new Keyword using constructor.

Function men(name){;; () { alrt(“pizza”);}

Note :- this Statement refers to the current Object.

Object with Array :-

Use of array Constructor

Var   a =new Array ( element1 , element 2, element3, ………………………….);

JavaScript use zero Indexing

a[0]=”welcome in tutorialworld”;

Use of Alert  with Array indexing


Length Function with array

alert  (a.length);

Function with new keyword :

a.sort(new Function(“name”, “alert(“hello”+name)”));

Follow Us

Contact Us

Back to Top