Higher Order Functions
We are used to passing data to a function or object to a function.
A Higher order function takes a function as an argument or returns a function as a result.
Example : map in JavaScript
const double = n n=> n*2;
[1,2,3,4].map(double)
or
# notice how map took function as an argument
[1,2,3,4].map(function(n){
return n*2;
})