Q:

How could i declare this object in javascript?

I like to delare array of this object, how could i do this in javascript?
student[0].name  
student[0].age
student[0].id

student[1].name  
student[1].age
student[1].id

Could someone please advise?

A:

like this:
var students = [{ name: 'foo', age: 5, id: 1 }, { name: 'bar', age: 6, id: 2 }];

A:

first declare an object 
this don't need a studnet.js you can write the object on the same file.
var newStudent = new Object(); //Declare object

newStudent.name="foo";
newStudent.age=20;
newStudent.id=01

//declare array
var student = new Array();
student.push(newStudent);

//later loop array and you can read with
student[0].age

