If you're not using map, reduce and filter in your JavaScript, you're missing out on three of the most powerful array methods available in the language.
All three methods share two basic principals:
- Firstly, they do not mutate the original array, they will always return a new array or value.
- Secondly, they get their values by iterating over each item in the array and applying a function that you provide.