If you want to use the same function in multiple places it makes sense to store it in a variable. This allows you to adhere to the DRY (Don't Repeat Yourself) principle.
Imagine we had a simple validation function:
function isPositive(val){
return val > 0;
}
Instead of inlining this anonymous function everywhere I need to validate, it is much easier to store the function in a variable for future use.
var isPositive = function(val){ return val > 0;}
This provides me with two major benefits. First, if there is an issue in isPositive
I can fix the issue at one spot and all invocations of the function will use the updated behavior. Second, it prevents me from messing up the function somewhere in the code when I'm retyping it for the 100th time.