2.4.16.4.4 Enumerator.prototype.moveFirst ( )

If the this object is not an Enumerator object raise a TypeError exception.

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

2. If collection is undefined, return undefined.

3. 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 the collection has no enumerable items, the new state will indicate that the end of the enumeration has been reached.

4. Return undefined.

Show: