Look under the heading "FOR/IN" in
this link for an explanation of how the for/in loop works.
As for the statement:
oRequired = new required();
In JavaScript, you can create a new object simply by defining a function and using the keyword new with that function. So, elsewhere in the code or in one of the includes, you will find a function required(). That function most likely defines properties, something like this:
function required() {
this.property1 = 'abc';
this.property2 = 'xyz';
this.property3 = new Array();
this.property3[0] = 'foo';
this.property3[1] = 'bar;';
}
The for/in loop simply iterates through the properties of the "required" object.
The code you are analyzing is expecting the properties of the "required" object to be arrays.