Home | Mailing List | Blog | Tutorial Videos

IIFE, HOF, or Both

Does the following snippet illustrate an Immediately-Invoked Function Expression (IIFE), a Higher-Order Function (HOF), both, or neither?

((fn, val) => {
  return fn(val);
})(console.log, 5);

Select one: