Core functions to operate on Arrays (API)
Array = Core entity of Javascript
array.filter(fn(currentValue, index?, array?), thisArg?)
callback - the function used for testing
currentValue - the element under test
index? - the index of the element under test
array? - the array being tested
thisArg? - the element this is bound to
array.find(fn(currentValue, index?, array?), thisArg?)
callback - the function used for testing
currentValue - the element under test
index? - the index of the element under test
array? - the array being tested
thisArg? - the element this is bound to
array.some(fn(currentValue, index?, array?), thisArg?)
callback - the function used for testing
currentValue - the element under test
index? - the index of the element under test
array? - the array being tested
thisArg? - the element this is bound to
array.every(fn(currentValue, index?, array?), thisArg?)
callback - the function used for testing
currentValue - the element under test
index? - the index of the element under test
array? - the array being tested
thisArg? - the element this is bound to
array.map(fn(currentValue, index?, array?), thisArg?)
callback - the function used for testing
currentValue - the element under test
index? - the index of the element under test
array? - the array being tested
thisArg? - the element this is bound to
array.flatMap(fn(currentValue, index?, array?), thisArg?)
callback - the function used for testing
currentValue - the element under test
index? - the index of the element under test
array? - the array being tested
thisArg? - the element this is bound to
array.reduce(
fn(accumulator, currentValue, index?, array?),
initialValue?)
callback - the function used for testing
accumulator - the result of the reducer
currentValue - the element under test
index? - the index of the element under test
array? - the array being tested
initialValue? - the value to start the reduction with
Check out and get familiar with the full Array API !
There is more coming soon => ES.Next