Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript iterate over object

var person={
 	first_name:"johnny",
  	last_name: "johnson",
	phone:"703-3424-1111"
};
for (var property in person) {
  	console.log(property,":",person[property]);
}
 
PREVIOUS NEXT
Tagged: #javascript #iterate #object
ADD COMMENT
Topic
Name
8+6 =