Javascript
Callbacks
- Callbacks are functions that are passed as values to other functions and can be chosen when to call it. It can be called at the convenience of the caller function.
- Callbacks are a staple in functional programming. Functions being passed into functions is important when using this style of programming.
function callback() {
// do something
}
function caller(callback) {
callback();
};