GOALS
Use the new arrow function syntax
Understand and use these methods:
forEach
map
filter
find
reduce
some
every
FOREACH
Accepts a callback
function.
Calls the function
once per element
in the array.
MAP
Creates a new array with the
results of calling a callback on
every element in the array
MAP
ARROW
FUNCTIONS!
ARROW
FUNCTIONS
"syntactically compact alternative"
to a regular function expression
ARROW
FUNCTIONS
IMPLICIT RETURN
All these functions do the same thing:
FIND
returns the value of the first element in the array that
satisfies the provided testing function.
FILTER
Creates a new array with all elements that pass the test
implemented by the provided function.
EVERY
tests whether all elements in the array pass the
provided function. It returns a Boolean value.
SOME
Similar to every, but returns true if ANY of the
array elements pass the test function
REDUCE
Executes a reducer function on
each element of the array,
resulting in a single value.
SUMMING AN ARRAY
FINDING MAX VAL
INITIAL VALUE
TALLYING