Passing a function as a parameter to another function

The function hi is a function that has a single parameter -- a function. The function displays 'hi' according to the specified outputFunction that is passed to the function hi.

  
   function hi(outputFunction) {
      let x = 'hi'
      outputFunction(x);
    }  
  

Anonymous functions

An anonymous function is a function that does not have a name