Higher Order function and Callback function in Javascript?

samrat9x

Samrat

Posted on December 8, 2022

Higher Order function and Callback function in Javascript?

Callback function : A function passes as argument into another function is called callback function.
Higher order function : A function which receives a callback function is called higher order function.
Example :

function foo(){
    console.log("Hello World");
}
function abu(e){
    e();
}
abu(foo);
Enter fullscreen mode Exit fullscreen mode

In this example abu() and foo() are higher order function and callback function respectively.

💖 💪 🙅 🚩
samrat9x
Samrat

Posted on December 8, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related