function invokingFunction(callbackFunctionParam){ //referenced without ()
console.log('event handler');
callbackFunctionParam(); //invoked by adding ()
}
var callbackFunction = function(){
console.log('inside callback function');
}
invokingFunction(callbackFunction); //passed as an object by omitting ()
```
This can be done **anonymously**
```javascript
function invokingFunction(callbackParam){
console.log('event handler');
callbackParam();
}
invokingFunction(function(){
console.log('inside callback function');
});
```
Remember that functions can access variables defined outside their scope. When dealing with functions executed after they declaration, make sure you examine what the values of the variables are