Answers for "how to use forEach to navigate through and object array using its value"

4

javascript loop through array of objects

let arr = [object0, object1, object2];

for (let elm of arr) {
  console.log(elm);
}
Posted by: Guest on June-01-2020
4

javascript loop through array of objects

var people=[
  {first_name:"john",last_name:"doe"},
  {first_name:"mary",last_name:"beth"}
];
for (let i = 0; i < people.length; i++) { 
  console.log(people[i].first_name);
}
Posted by: Guest on June-17-2019

Code answers related to "how to use forEach to navigate through and object array using its value"

Code answers related to "Javascript"

Browse Popular Code Answers by Language