If you want to use anonymouse function in javascript then you can easily use arguments.callee
As example :
function makeFactorial(){
return function fact(x)
{
if(x > 1)
return x * argument.callee(x-1)
}
}
makeFactorial()(4) ;
output is 24.
also you can see the arguments by using func_name.arguments
Advertisement