A for-in loop in which the variable name is not explicitly scoped to the enclosing scope with the var keyword can refer to a variable in an enclosing scope outside the nearest enclosing scope. This will overwrite the existing value of the variable in the outer scope when the body of the for-in is evaluated.