More Arrays

forEach

map

reduce

find and filter

every and some


Exercises

  1. Given an array of numbers from 1 to 10, get the squares of these 10 numbers with forEach.
  2. Given an array of numbers from 1 to 10, get the cubes of these 10 numbers with map.
  3. Given an array of numbers from 1 to 10, get the sum of them with reduce.
  4. Given an array of numbers from 1 to 10, get the average with the sum from the above question; get all the numbers greater than the average with filter.