push, pop, shift & unshift
push(element0, ...)
adds elements to the end
  • Returns new length of the array
unshift(element0, ...)
adds elements to the beginning
  • Returns new length of the array
pop()
removes last element from array
  • Returns removed element
shift()
removes first element
  • Returns removed element
map, filter, reduce, some, every, find
map((value, index, array) => { ... })
creates a new array based on returned value from callback
filter((currentValue, index, array) => { ... })
creates a new array with all elements that pass the test
reduce((accumulator, currentValue, index, array) => { ... }, initialValue)
executes a reducer function on each element of the array
some((element, index, array) => { ... } )
returns true if at least one element passes the test
every((element, index, array) => { ... } )
returns true if all elements pass the test
  • [12, 5, 8, 130, 44].every(x => x >= 10); // false
find((element, index, array) => { ... } )
returns first element that passes the test
  • [5, 12, 8, 130, 44].find(x => x > 10); // 12