function myFunction(){}
is the same as var myFunction = function myFunction(){}
. If you just do MyFunction = function(){}
, it's like MyFunction = function anonymous(){}
.
The variables and functions have different scopes but the function can only be referenced outside the function via the variable name, which needs to be bound to the function.
function myFunction(){}
binds the myFunction
variable to a function that just happens to have the same name.