- Toggle shortcuts help
?
- Toggle "can call user code" annotations
u
- Jump to search box
/
- Toggle pinning of the current clause
p
- Jump to the nth pin
1-9
- Jump to the 10th pin
0
- Jump to the most recent link target
`
Stage 0 Draft / February 3, 2026
Iterator Includes
1 Iterator.prototype.includes ( searchElement [ , skippedElements ] )
- Let O be the this value.
- If O is not an Object, throw a TypeError exception.
- If skippedElements is undefined, then
- Let toSkip be 0.
- Else,
- If skippedElements is not one of +∞𝔽, -∞𝔽, or an integral Number, throw a TypeError exception.
- Let toSkip be the extended mathematical value of skippedElements.
- If toSkip < 0, throw a RangeError exception.
- Let skipped be 0.
- Let iterated be ? GetIteratorDirect(O).
- Repeat,
- Let value be ? IteratorStepValue(iterated).
- If value is done, return false.
- If skipped < toSkip, then
- Set skipped to skipped + 1.
- Else if SameValueZero(value, searchElement) is true, then
- Return ? IteratorClose(iterated, NormalCompletion(true)).