2.8.13.4.4 Enumerator.prototype.moveFirst ( )

1. If the this object is not an Enumerator object, throw a TypeError exception.

2. Let collection be the value of the this object’s [[Collection]] property.

3. If collection is undefined, return undefined.

4. Modify the [[EnumerationState]] property of the this object to a state indicating that the current enumeration of collection is now positioned at the original first item of the enumeration. If the current [[EnumerationState]] property indicates that collection has no enumerable items, the new state will indicate that the end of the enumeration has been reached.

5. Return undefined.

Show: