Loops through the properties of an object.
Syntax
for (objectVariable in object){
statement
}
Example
for (var catProperty in cat) {
document.write(catProperty + " : " + cat[catProperty] + "
"); //writes the name and value of the properties in cat.
}