Skip to content Skip to sidebar Skip to footer

Objects in javascript

Objects in JavaScript:-
    In objects need one array and more objects for creating object array, in every loop we need to create a object variable and every loop end push it to the array. Finally you can read it.

Syntax:-
var array_result=[];

for(i=0;i<0;i++)
{
 var obj_variable=new Object();
  obj_variable.Name="value : " +i;
  obj_variable.Number="value : " + i;
  array_result.push(obj_variable);
}



Example Program:- (Editor)



Output:-


Advertisement


Screen Shots:-


Objects in javascript

Post a Comment for "Objects in javascript"