There are multiple ways to invoke a javascript function, most of the time I'm using anonymous function as it can be trigger anywhere I like.
I can't seem to understand why use the variable method instead of the anonymous function. The main disadvantage for me is because of the hoisting issue....
Can anyone explain or provide a real life example when is it appropriate to store function within a variable?