Possible Duplicate:
JavaScript: var functionName = function() {} vs function functionName() {}
Suppose we are inside a function and not in the global namespace.
function someGlobalFunction() {
var utilFunction1 = function() {
}
function utilFunction2 () {
}
utilFunction1();
utilFunction2();
}
Are these synonymous? And do these functions completely cease to exist when someGlobalFunction
returns? Should I prefer one or the other for readability or some other reason?