The getNthFieldName method returns the name of the Nth field object.
getNthFieldName(System.Int32 nIndex);
nIndex
The index of the field to search
Returns the name of the Nth field object, otherwise, null.
Member of doc.
for (var i = 0; i < this.numFields; i++)
app.alert("Field[" + i + "]: " + this.getNthFieldName(i));