It is a named function expression.
Contrary to Function Declarations the Identifier of a Function Expression is not mandatory.
Your function def
is not immediately invoked - the whole function is passed to abc
and needs to be invoked explicitely abc()
.
§13 of the ES5 spec states how named function expressions are built. Read the third production rule on how named function expressions are built.
NOTE The Identifier in a FunctionExpression can be referenced from
inside the FunctionExpression's FunctionBody to allow the function to
call itself recursively. However, unlike in a FunctionDeclaration, the
Identifier in a FunctionExpression cannot be referenced from and does
not affect the scope enclosing the FunctionExpression.
All recent browsers handle this correctly, so you don't have to worry about and memory leaks or other weird stuff (the incorrect handling is only in old IE <=8).