Array<T>.prototype.*
concat(...items: (T | ConcatArray<T>)[]): T[]- Non-destructively concatenates
thisand the parameters (which can be single elements or array of elements). - ES3, non-destructive
['a'].concat('b', ['c', 'd']) → [ 'a', 'b', 'c', 'd' ]
- Non-destructively concatenates
copyWithin(target: number, start: number, end?: number): this- Copies the elements whose indices range from
startto (excl.)endto indices starting withtarget. Overlapping is handled correctly. - ES6, destructive
['a', 'b', 'c', 'd'].copyWithin(0, 2, 4) → [ 'c', 'd', 'c', 'd' ]
- Copies the elements whose indices range from
entries(): Iterable<[number, T]>- Returns an iterable over [index, element] pairs.
- ES6, non-destructive
Array.from(['a', 'b'].entries()) → [ [ 0, 'a' ], [ 1, 'b' ] ]
every(callback: (value: T, index: number, array: Array<T>) => boolean, thisArg?: any): boolean- Returns
trueifcallbackreturnstruefor every element. Stops as soon as it receivesfalse. Math: ∀ - ES5, non-destructive
[1, 2, 3].every(x => x > 0) → true[1, -2, 3].every(x => x > 0) → false
- Returns
fill(value: T, start?: number, end?: number): this- Assigns
valueto every index. - ES6, destructive
[0, 1, 2].fill('a') → [ 'a', 'a', 'a' ]
- Assigns
filter(callback: (value: T, index: number, array: Array<T>) => any, thisArg?: any): T[]- Returns an array with only those elements for which
callbackreturnstrue. - ES5, non-destructive
[1, -2, 3].filter(x => x > 0) → [ 1, 3 ]
- Returns an array with only those elements for which
findfindIndexforEachincludesindexOfjoinkeyslastIndexOfmappoppushreducereduceRightreverseshiftslicesomesortsplicetoLocaleStringtoStringunshiftvalues