In your example, this really doesn't really matter much. The only difference is that functions declared with help function foo() { }are available anywhere in the same space at any time, and functions declared with help var foo = function () { }are available only after the code executing the task has been run.
foo();
function foo() { ... };
bar();
var bar = function () { ... };
bar();
, :
arr.sort(function (a, b) { return a - b; });
function MyObject() {
this.foo = function () { ... }
}