Higher Order function and Callback function in Javascript?
Samrat
Posted on December 8, 2022
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);
In this example abu()
and foo()
are higher order function and callback function respectively.
💖 💪 🙅 🚩
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.