Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ copyright: false
1. If _O_ is not an Object, throw a *TypeError* exception.
1. Let _iterated_ be the Iterator Record { [[Iterator]]: _O_, [[NextMethod]]: *undefined*, [[Done]]: *false* }.
1. If _skippedElements_ is *undefined*, then
1. Let _toSkip_ be 0.
1. Let _toSkip_ be *+0*<sub>𝔽</sub>.
1. Else,
1. If _skippedElements_ is not one of *+∞<sub>𝔽</sub>*, *-∞<sub>𝔽</sub>*, or an integral Number, then
1. Let _error_ be ThrowCompletion(a newly created *TypeError* object).
1. Return ? IteratorClose(_iterated_, _error_).
1. Let _toSkip_ be the extended mathematical value of _skippedElements_.
1. If _toSkip_ &lt; 0, then
1. Let _toSkip_ be _skippedElements_.
1. If _toSkip_ &lt; *-0*<sub>𝔽</sub>, then
1. Let _error_ be ThrowCompletion(a newly created *RangeError* object).
1. Return ? IteratorClose(_iterated_, _error_).
1. Let _skipped_ be 0.
1. Let _skipped_ be *+0*<sub>𝔽</sub>.
1. Set _iterated_ to ? GetIteratorDirect(_O_).
1. Repeat,
1. Let _value_ be ? IteratorStepValue(_iterated_).
1. If _value_ is ~done~, return *false*.
1. If _skipped_ &lt; _toSkip_, then
1. Set _skipped_ to _skipped_ + 1.
1. Set _skipped_ to _skipped_ + *1*<sub>𝔽</sub>.
1. Else if SameValueZero(_value_, _searchElement_) is *true*, then
1. Return ? IteratorClose(_iterated_, NormalCompletion(*true*)).
</emu-alg>
Expand Down
Loading