The type of elements in the array. 数组元素的类型
Creates a new ArrayIterator instance
创建一个新的 ArrayIterator 实例
The type of elements in the array. 数组元素的类型
The source array to iterate. 要迭代的源数组
Implements the iterable protocol, allowing ArrayIterator to be used in for...of loops, spread operator, and other iterable consumers
实现可迭代协议,允许 ArrayIterator 用于 for...of 循环、展开运算符及其他可迭代消费者
An iterator for the processed elements. 处理后元素的迭代器
Drops the first N elements
跳过前 N 个元素
The number of elements to drop. 要跳过的元素数量
A new ArrayIterator instance with the drop operation. 带有跳过操作的新 ArrayIterator 实例
Tests whether all elements pass the test implemented by the provided function
测试所有元素是否都通过了由提供的函数实现的测试
The function to test for each element. 用于测试每个元素的函数
true if all elements pass the test, false otherwise. 如果所有元素都通过测试则返回 true,否则返回 false
Filters elements based on a predicate function
根据断言函数过滤元素
The predicate function. 断言函数
A new ArrayIterator instance with the filter operation. 带有过滤操作的新 ArrayIterator 实例
Returns the value of the first element that satisfies the provided testing function
返回满足提供的测试函数的第一个元素的值
The function to test for each element. 用于测试每个元素的函数
The value of the first element that passes the test, or undefined if no element passes. 通过测试的第一个元素的值,如果没有元素通过则返回 undefined
Executes a provided callback function once for each array element
对数组中的每个元素执行一次提供的回调函数
The function to execute for each element. 为每个元素执行的函数
Transforms elements using a transform function
使用转换函数转换元素
The type of transformed elements. 转换后的元素类型
A new ArrayIterator instance with the map operation. 带有映射操作的新 ArrayIterator 实例
Tests whether at least one element passes the test implemented by the provided function
测试是否至少有一个元素通过了由提供的函数实现的测试
The function to test for each element. 用于测试每个元素的函数
true if at least one element passes the test, false otherwise. 如果至少有一个元素通过测试则返回 true,否则返回 false
Takes the first N elements
获取前 N 个元素
The maximum number of elements to take. 要获取的最大元素数
A new ArrayIterator instance with the take operation. 带有获取操作的新 ArrayIterator 实例
Executes all chained operations and returns the final result array
执行所有链式操作并返回最终结果数组
An array of the processed elements. 处理后的元素数组
An iterator class for arrays with chainable operations and lazy evaluation
支持链式操作和惰性计算的数组迭代器类
Example