Possible Duplicate:
Javascript: var functionName = function() {} vs function functionName() {}
I have code with functions defined in two ways:
var retrieveData = function (statusValue, statusText)
{
...
}
function retrieveData(statusValue, statusText) {
..
}
retrieveData(1,2);
Can someone explain what the difference is. Seems that the second way of setting up the function is much simpler.