Map: Another Higher Order Function
Map is another higher order function that goes through an array and doesn’t discard it but instead transforms/mutates it.
A collection of 2 posts
Map is another higher order function that goes through an array and doesn’t discard it but instead transforms/mutates it.
When working with multiple levels of conditionals, it helps to DRY things up a bit: not repeating yourself can give performance gains as well as make your code more readable and elegant.