Array<T>.prototype.*
concat(: (T | Array<T>)[]): T[]
concat(items)π- Returns a new array that is the concatenation of
thisand allitems. Non-array parameters are treated as if they were arrays with single elements. - ES3
['a'].concat('b', ['c', 'd']) β [ 'a', 'b', 'c', 'd' ]
- Returns a new array that is the concatenation of
copyWithin(:number, :number, ?:number): this
copyWithin(target, start, end)βοΈ- Copies the elements whose indices range from
startto (excl.)endto indices starting withtarget. Overlapping is handled correctly. - ES6
['a', 'b', 'c', 'd'].copyWithin(0, 2, 4) β [ 'c', 'd', 'c', 'd' ]
- Copies the elements whose indices range from
entries(): Iterable<[number, T]>
entries()π- Returns an iterable over [index, element] pairs.
- ES6
Array.from(['a', 'b'].entries()) β [ [ 0, 'a' ], [ 1, 'b' ] ]
every(:(value:T, index:number, array:Array<T>) => boolean, ?:any): boolean
every(callback, thisArg)π- Returns
trueifcallbackreturnstruefor every element. Stops as soon as it receivesfalse. Math: β - ES5
[1, 2, 3].every(x => x > 0) β true[1, -2, 3].every(x => x > 0) β false
- Returns
...