- A function that takes another function as an argument or returns a function is called a Higher-Order Function & the argument function is known as a callback function.
function x() {
console.log('I am from function x');
}
function y(x) {
console.log('I am from function Y')
}
- Here function y is a Higher Order function. & function y became a callback function
- map(), Filter(), reduce() Are the most common Higher-Order Functions in Javascript