I am new to Javascript and I was trying to display an array of objects. I could not really make it happen. Because the number of objects in the array is more than one and each object has 2 attributes. eg
var person = {
firstName : "John",
lastName : "Doe",
age : 50,
eyeColor : "blue"
};
var person1 = {
firstName : "Ben",
lastName : "",
age : 44,
eyeColor : "brown"
};
var people = [];
people.push(person);
people.push(person1);
Now, if i want to print the "firstname" then what should i do for the script and the body of the html file? Thanks in advance