Summary
Implement the remaining commonly-used Array.prototype methods that are currently absent.
Motivation
~25 Array methods are already implemented (map, filter, reduce, forEach, flat, flatMap, splice, etc.). Filling the gaps with the most practical missing methods improves compatibility with real-world JS code.
Priority order (by practical usage)
High:
fill(value, start?, end?)
find(predicate, thisArg?)
findIndex(predicate, thisArg?)
Medium:
entries() — returns an iterator (can be a simple array of [index, value] pairs)
keys() — returns an iterator
values() — returns an iterator
copyWithin(target, start, end?)
reduceRight(callback, initialValue?)
Low:
findLast(predicate, thisArg?)
findLastIndex(predicate, thisArg?)
Array.from(arrayLike)
Array.fromAsync(arrayLike) — requires async support
Out of scope
toReversed, toSorted, toSpliced, with (ES2023 immutable variants — lower priority)
toLocaleString
Summary
Implement the remaining commonly-used
Array.prototypemethods that are currently absent.Motivation
~25 Array methods are already implemented (map, filter, reduce, forEach, flat, flatMap, splice, etc.). Filling the gaps with the most practical missing methods improves compatibility with real-world JS code.
Priority order (by practical usage)
High:
fill(value, start?, end?)find(predicate, thisArg?)findIndex(predicate, thisArg?)Medium:
entries()— returns an iterator (can be a simple array of[index, value]pairs)keys()— returns an iteratorvalues()— returns an iteratorcopyWithin(target, start, end?)reduceRight(callback, initialValue?)Low:
findLast(predicate, thisArg?)findLastIndex(predicate, thisArg?)Array.from(arrayLike)Array.fromAsync(arrayLike)— requires async supportOut of scope
toReversed,toSorted,toSpliced,with(ES2023 immutable variants — lower priority)toLocaleString