Some differences that I'm aware of.
function myFunction(parameters){}
Above function is always callable, both before and after where it's located in your code.
var functionName = function(parameters) {};
This is only callable once the code has been run (i.e. the object has been defined).
So you can do things like;
if(condition) {
var functionName = function(parameters) {};
}
if(functionName != undefined) { functionName(); }
Also you can use them as callbacks;
function anotherMethod(parameters, callbackFunction){
// Do things with parameters
callbackFunction(parameters);
}
var functionName = function(parameters) {};
anotherMethod(parameters, functionName);
Also, probably the most important thing usually is that the latter format allows for namespacing, instead of gathering all functions in the global space which might end up with duplicate function names in a large project with several large libraries used.
var uniqueName1 = {
firstFunction: function(){},
secondFunction: function(){},
};
var uniqueName2 = {
firstFunction: function(){},
secondFunction: function(){},
};
uniqueName1.firstFunction();
uniqueName2.firstFunction();