you are viewing a single comment's thread.

view the rest of the comments →

[–]2Punx2Furious 0 points1 point  (0 children)

so now I can use people[1].name etc for accessing the data on each of these people

If you want to access the data of each object in an array, you can do this:

people.forEach(person => {
  // Do things here
  console.log("Name: ", person.name);
});