High Order Functions in Javascript

A function that returns a function or receives a function is called a Higher-Order Function
const sayHello = function() {
return function() {
console.log("Hello!");
}
}
const myFunc = sayHello();
myFunc();