TypeScript Array
13 functions
atarray.at(index: number): T | undefinedReturns the item at the given index (supports negative indices).
Array.fromArray.from(arrayLike, mapFn?): T[]Creates a new Array instance from an array-like or iterable object.
Array.ofArray.of(...items: T[]): T[]Creates a new Array instance with a variable number of arguments.
everyarray.every(predicate): booleanTests whether all elements in the array pass the provided function.
fillarray.fill(value, start?, end?): T[]Changes all elements in an array to a static value, from a start index to an end index.
findIndexarray.findIndex(predicate): numberReturns the index of the first element satisfying the provided testing function.
findLastarray.findLast(predicate): T | undefinedReturns the last element satisfying the provided testing function. (ES2023)
findLastIndexarray.findLastIndex(predicate): numberReturns the index of the last element satisfying the provided testing function. (ES2023)
flatarray.flat(depth?): T[]Creates a new array with all sub-array elements concatenated recursively up to the specified depth.
flatMaparray.flatMap(mapFn): T[]Returns a new array formed by applying a given callback function to each element, then flattening the result by one level.
includesarray.includes(value, fromIndex?): booleanDetermines whether an array includes a certain value among its entries.
somearray.some(predicate): booleanTests whether at least one element in the array passes the provided function.
structuredClonestructuredClone<T>(value: T): TCreates a deep clone of the given value.
