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:-
Output:-
Advertisement
Screen Shots:-
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);
}
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:-
Post a Comment for "Objects in javascript"