for in
The for in loop is for iterating through the enumerable properties of an object. See Objects and Associative Array.
Syntax
for (variable in object) {
// code to be executed
}
Example
var person={firstName:"John",lastName:"Smith",age:21};
for (i in person) {
s = s + person[i];
}