Answers for "javascript loop through objct"

53

javascript loop through objec

var person={
 	first_name:"johnny",
  	last_name: "johnson",
	phone:"703-3424-1111"
};
for (var property in person) {
  	console.log(property,":",person[property]);
}
Posted by: Guest on July-22-2019
0

loop on objects js

for (const [key, value] of Object.entries(object)) {
  console.log(key, value);
}
Posted by: Guest on August-15-2021

Code answers related to "javascript loop through objct"

Code answers related to "Javascript"

Browse Popular Code Answers by Language