Hi,
when I code:
var a =
function()
{
alert("44")
return function(){alert(33)}
}()();
is this expression evaluated in the following order?
- define the function;
- pass its reference pointer to a
- a() is invoked
- return in a a new function pointer
- a() is invoked again
and if so why do I have a syntax error if I do:
function()
{
alert("44")
return function(){alert(33)}
}();
the interpreter wants a left operand first...
but this syntax works:
(
function()
{
alert("44")
return function(){alert(33)}
};
)()
the outer parenthesis what does meaning???
Thanks