Answers for "how to loop through all items in object and print them"

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 loop through all items in object and print them"

Code answers related to "Javascript"

Browse Popular Code Answers by Language