A function passed as an argument to another function that is called after the function finishes executing. Similar to Continuation. When youâre done, call this next
- Reading files
- Network requests
- Interacting with databases
Example
hello(goodbye);
function hello(callback){
console.log("Hello");
callback();
}
function goodbyte(){
console.log("Goodbye");
}