I was editing Chrome's sample [oauth contacts extension](http://developer.chrome.com/extensions/examples/extensions/oauth_contacts.zip)

when I came across an interesting for-loop in line 7 of `contacts.js`:

```
for (var i = 0, contact; contact = contacts[i]; i++) {

```

variable `i` was never used in the body of the for loop, so it seemed like a typical "for...in" loop. I tried replacing the for-loop with

```
for (contact in contacts) {

```

but when I ran the extension, all my contacts came back `undefined` 

Here is the full for-loop from the extension

```
for (var i = 0, contact; contact = contacts[i]; i++) {
  var div = document.createElement('div');
  var pName = document.createElement('p');
  var ulEmails = document.createElement('ul');

  pName.innerText = contact['name'];
  div.appendChild(pName);

  for (var j = 0, email; email = contact['emails'][j]; j++) {
    var liEmail = document.createElement('li');
    liEmail.innerText = email;
    ulEmails.appendChild(liEmail);
  }

  div.appendChild(ulEmails);
  output.appendChild(div);
}

```