function foo() {
}
and var foo = function() {
};
Was that with the first form foo() will always be declared and available for use inside a scope, while the second form depends at which point it is declared.But I had read somewhere (can't remember where... jshint?) a long while ago that using the latter form inside scopes was better, so I've adopted that.
I don't think I will go with the guide for this one, since not having the function defined automatically is often useful, to avoid overhead of instantiating the function for when it's not going to be used due to code flow.