Possible Duplicate:
JavaScript: var functionName = function() {} vs function functionName() {}
In JavaScript, I can define a function and assign it to a variable:
var myVar = function myFunc(){};
or define the function standalone:
function myFunc(){};
What are the use cases for the first approach?
functions declared to variables are not hoisted to the top of the scope
See this previous related answer. Are named functions or anonymous functions preferred in JavaScript?
This will end up looking similar to this after the parse runs through it