for score

February 11, 2014

The for in statement can function as a quick and semantic iterator for looping over object properties.

In your console, try

> var person = {
    first_name: "Katie",
    last_name : "Leonard"
  };

> var name;

> for(name in person){
    console.log(name + " : " + person[name];
  )};

first_name : Katie
last_name : Leonard

Awesome

Resources

JavaScript: The Good Parts


Katie Leonard

Mostly Katie explaining things to herself.

© 2025