JavaScript Array Methods
JavaScript Array Methods
MASTER JAVASCRIPT
ARRAYS LIKE A PRO!
02
TO MUTATE THE
ORIGINAL ARRAY
Add to original
.push .unshift
(end) (start)
Others
A NEW ARRAY
Computed from original
.map (loop)
.filter
Portion of original
.slice
.concat
.flat .flatMap
04
AN ARRAY INDEX
Based on value
.indexOf
.findIndex
AN ARRAY ELEMENT
Based on test condition
.find
05
KNOW IF ARRAY
INCLUDES
Based on value
.includes
.some .every
A NEW STRING
Based on separator string
.join
06
TO TRANSFORM TO
VALUE
Based on accumulator
.reduce
(Accumulate into a single value )
.forEach
(Does not create a new array,
only loops over the original array)
07
REPOST,
IF YOU LOVED THE POST!