11# ECMAScript: Array
22
33## Modules
4- [`es.array.from`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.from.js), [`es.array.from-async`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.from-async.js), [`es.array.is-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.is-array.js), [`es.array.of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.of.js), [`es.array.copy-within`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.copy-within.js), [`es.array.fill`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.fill.js), [`es.array.find`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.find.js), [`es.array.find-index`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.find-index.js), [`es.array.find-last`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.find-last.js), [`es.array.find-last-index`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.find-last-index.js), [`es.array.iterator`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.iterator.js), [`es.array.includes`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.includes.js), [`es.array.push`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.push.js), [`es.array.slice`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.slice.js), [`es.array.join`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.join.js), [`es.array.unshift`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.unshift.js), [`es.array.index-of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.index-of.js), [`es.array.last-index-of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.last-index-of.js), [`es.array.every`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.every.js), [`es.array.some`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.some.js), [`es.array.for-each`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.for-each.js), [`es.array.map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.map.js), [`es.array.filter`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.filter.js), [`es.array.reduce`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.reduce.js), [`es.array.reduce-right`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.reduce-right.js), [`es.array.reverse`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.reverse.js), [`es.array.sort`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.sort.js), [`es.array.flat`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.flat.js), [`es.array.flat-map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.flat-map.js), [`es.array.unscopables.flat`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.unscopables.flat.js), [`es.array.unscopables.flat-map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.unscopables.flat-map.js), [`es.array.at`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.at.js), [`es.array.to-reversed`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.to-reversed.js), [`es.array.to-sorted`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.to-sorted.js), [`es.array.to-spliced`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.to-spliced.js), [`es.array.with`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.with.js).
4+ [`es.array.from`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.from.js), [`es.array.from-async`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.from-async.js), [`es.array.of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.of.js), [`es.array.copy-within`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.copy-within.js), [`es.array.fill`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.fill.js), [`es.array.find`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.find.js), [`es.array.find-index`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.find-index.js), [`es.array.find-last`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.find-last.js), [`es.array.find-last-index`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.find-last-index.js), [`es.array.iterator`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.iterator.js), [`es.array.includes`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.includes.js), [`es.array.push`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.push.js), [`es.array.slice`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.slice.js), [`es.array.join`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.join.js), [`es.array.unshift`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.unshift.js), [`es.array.index-of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.index-of.js), [`es.array.last-index-of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.last-index-of.js), [`es.array.map`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.map.js), [`es.array.filter`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.filter.js), [`es.array.reduce`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.reduce.js), [`es.array.reduce-right`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.reduce-right.js), [`es.array.reverse`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.reverse.js), [`es.array.sort`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.sort.js), [`es.array.flat`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.flat.js), [`es.array.flat-map`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.flat-map.js), [`es.array.unscopables.flat`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.unscopables.flat.js), [`es.array.unscopables.flat-map`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.unscopables.flat-map.js), [`es.array.at`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.at.js), [`es.array.to-reversed`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.to-reversed.js), [`es.array.to-sorted`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.to-sorted.js), [`es.array.to-spliced`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.to-spliced.js), [`es.array.with`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.with.js).
55
66## Built-ins signatures
77``` ts
@@ -10,7 +10,6 @@ class Array {
1010 concat(... args : Array <mixed >): Array <mixed >; // with adding support of @@isConcatSpreadable and @@species
1111 copyWithin(target : number , start : number , end ? : number ): this ;
1212 entries(): Iterator <[index , value ]>;
13- every(callbackfn : (value : any , index : number , target : any ) => boolean , thisArg ? : any ): boolean ;
1413 fill(value : any , start ? : number , end ? : number ): this ;
1514 filter(callbackfn : (value : any , index : number , target : any ) => boolean , thisArg ? : any ): Array <mixed >; // with adding support of @@species
1615 find(callbackfn : (value : any , index : number , target : any ) => boolean ), thisArg? : any ): any ;
@@ -19,7 +18,6 @@ class Array {
1918 findLastIndex(callbackfn : (value : any , index : number , target : any ) => boolean , thisArg ? : any ): uint ;
2019 flat(depthArg ? : number = 1 ): Array <mixed >;
2120 flatMap(mapFn : (value : any , index : number , target : any ) => any , thisArg : any ): Array <mixed >;
22- forEach(callbackfn : (value : any , index : number , target : any ) => void , thisArg ? : any ): void ;
2321 includes(searchElement : any , from ? : number ): boolean ;
2422 indexOf(searchElement : any , from ? : number ): number ;
2523 join(separator : string = ' ,' ): string ;
@@ -32,7 +30,6 @@ class Array {
3230 reverse(): this ; // Safari 12.0 bug fix
3331 slice(start ? : number , end ? : number ): Array <mixed >; // with adding support of @@species
3432 splice(start ? : number , deleteCount ? : number , ... items : Array <mixed >): Array <mixed >; // with adding support of @@species
35- some(callbackfn : (value : any , index : number , target : any ) => boolean , thisArg ? : any ): boolean ;
3633 sort(comparefn ? : (a : any , b : any ) => number ): this ; // with modern behavior like stable sort
3734 toReversed(): Array <mixed >;
3835 toSpliced(start ? : number , deleteCount ? : number , ... items : Array <mixed >): Array <mixed >;
@@ -44,7 +41,6 @@ class Array {
4441 @@unscopables : { [newMethodNames : string ]: true };
4542 static from(items : Iterable | ArrayLike , mapFn ? : (value : any , index : number ) => any , thisArg ? : any ): Array <mixed >;
4643 static fromAsync(asyncItems : AsyncIterable | Iterable | ArrayLike , mapfn ? : (value : any , index : number ) => any , thisArg ? : any ): Array ;
47- static isArray(value : any ): boolean ;
4844 static of(... args : Array <mixed >): Array <mixed >;
4945}
5046
@@ -59,42 +55,38 @@ core-js(-pure)/es|stable|actual|full/array
5955core-js(-pure)/es|stable|actual|full/array/from
6056core-js(-pure)/es|stable|actual|full/array/from-async
6157core-js(-pure)/es|stable|actual|full/array/of
62- core-js(-pure)/es|stable|actual|full/array/is-array
63- core-js(-pure)/es|stable|actual|full/array(/virtual)/at
64- core-js(-pure)/es|stable|actual|full/array(/virtual)/concat
65- core-js(-pure)/es|stable|actual|full/array(/virtual)/copy-within
66- core-js(-pure)/es|stable|actual|full/array(/virtual)/entries
67- core-js(-pure)/es|stable|actual|full/array(/virtual)/every
68- core-js(-pure)/es|stable|actual|full/array(/virtual)/fill
69- core-js(-pure)/es|stable|actual|full/array(/virtual)/filter
70- core-js(-pure)/es|stable|actual|full/array(/virtual)/find
71- core-js(-pure)/es|stable|actual|full/array(/virtual)/find-index
72- core-js(-pure)/es|stable|actual|full/array(/virtual)/find-last
73- core-js(-pure)/es|stable|actual|full/array(/virtual)/find-last-index
74- core-js(-pure)/es|stable|actual|full/array(/virtual)/flat
75- core-js(-pure)/es|stable|actual|full/array(/virtual)/flat-map
76- core-js(-pure)/es|stable|actual|full/array(/virtual)/for-each
77- core-js(-pure)/es|stable|actual|full/array(/virtual)/includes
78- core-js(-pure)/es|stable|actual|full/array(/virtual)/index-of
79- core-js(-pure)/es|stable|actual|full/array(/virtual)/iterator
80- core-js(-pure)/es|stable|actual|full/array(/virtual)/join
81- core-js(-pure)/es|stable|actual|full/array(/virtual)/keys
82- core-js(-pure)/es|stable|actual|full/array(/virtual)/last-index-of
83- core-js(-pure)/es|stable|actual|full/array(/virtual)/map
84- core-js(-pure)/es|stable|actual|full/array(/virtual)/push
85- core-js(-pure)/es|stable|actual|full/array(/virtual)/reduce
86- core-js(-pure)/es|stable|actual|full/array(/virtual)/reduce-right
87- core-js(-pure)/es|stable|actual|full/array(/virtual)/reverse
88- core-js(-pure)/es|stable|actual|full/array(/virtual)/slice
89- core-js(-pure)/es|stable|actual|full/array(/virtual)/some
90- core-js(-pure)/es|stable|actual|full/array(/virtual)/sort
91- core-js(-pure)/es|stable|actual|full/array(/virtual)/splice
92- core-js(-pure)/es|stable|actual|full/array(/virtual)/to-reversed
93- core-js(-pure)/es|stable|actual|full/array(/virtual)/to-sorted
94- core-js(-pure)/es|stable|actual|full/array(/virtual)/to-spliced
95- core-js(-pure)/es|stable|actual|full/array(/virtual)/unshift
96- core-js(-pure)/es|stable|actual|full/array(/virtual)/values
97- core-js(-pure)/es|stable|actual|full/array(/virtual)/with
58+ core-js(-pure)/es|stable|actual|full/array(/prototype)/at
59+ core-js(-pure)/es|stable|actual|full/array(/prototype)/concat
60+ core-js(-pure)/es|stable|actual|full/array(/prototype)/copy-within
61+ core-js(-pure)/es|stable|actual|full/array(/prototype)/entries
62+ core-js(-pure)/es|stable|actual|full/array(/prototype)/fill
63+ core-js(-pure)/es|stable|actual|full/array(/prototype)/filter
64+ core-js(-pure)/es|stable|actual|full/array(/prototype)/find
65+ core-js(-pure)/es|stable|actual|full/array(/prototype)/find-index
66+ core-js(-pure)/es|stable|actual|full/array(/prototype)/find-last
67+ core-js(-pure)/es|stable|actual|full/array(/prototype)/find-last-index
68+ core-js(-pure)/es|stable|actual|full/array(/prototype)/flat
69+ core-js(-pure)/es|stable|actual|full/array(/prototype)/flat-map
70+ core-js(-pure)/es|stable|actual|full/array(/prototype)/includes
71+ core-js(-pure)/es|stable|actual|full/array(/prototype)/index-of
72+ core-js(-pure)/es|stable|actual|full/array(/prototype)/iterator
73+ core-js(-pure)/es|stable|actual|full/array(/prototype)/join
74+ core-js(-pure)/es|stable|actual|full/array(/prototype)/keys
75+ core-js(-pure)/es|stable|actual|full/array(/prototype)/last-index-of
76+ core-js(-pure)/es|stable|actual|full/array(/prototype)/map
77+ core-js(-pure)/es|stable|actual|full/array(/prototype)/push
78+ core-js(-pure)/es|stable|actual|full/array(/prototype)/reduce
79+ core-js(-pure)/es|stable|actual|full/array(/prototype)/reduce-right
80+ core-js(-pure)/es|stable|actual|full/array(/prototype)/reverse
81+ core-js(-pure)/es|stable|actual|full/array(/prototype)/slice
82+ core-js(-pure)/es|stable|actual|full/array(/prototype)/sort
83+ core-js(-pure)/es|stable|actual|full/array(/prototype)/splice
84+ core-js(-pure)/es|stable|actual|full/array(/prototype)/to-reversed
85+ core-js(-pure)/es|stable|actual|full/array(/prototype)/to-sorted
86+ core-js(-pure)/es|stable|actual|full/array(/prototype)/to-spliced
87+ core-js(-pure)/es|stable|actual|full/array(/prototype)/unshift
88+ core-js(-pure)/es|stable|actual|full/array(/prototype)/values
89+ core-js(-pure)/es|stable|actual|full/array(/prototype)/with
9890```
9991
10092## Examples
0 commit comments