Can anyone explain the for/in please?


Hey, can anyone explain how the for/in works please?
Codeacadamy just kind of gives it to you without explaining exactly how it works.

Below is the for/in which they use for the contact list.
How does it know to search through the friends object and list the entries there?

var list = function(obj) {
  for(var prop in obj) {



google "mdn for in" ->