If there is a recursive call to be made in Javascript, there are basically 2 ways to do it. First way being -
function a() {
a();
}
and second way -
function a() {
arguments.callee();
}
Questions - 1) Its given in many places that 2nd way is better than 1st, but there is no explanation.
2) Arguments.callee being deprecated, what is the alternative?
3) Is there a way to call a self invoked function recursively, and that too with the function being anonymous. like given below, without using arguments.callee or any other function inside it.
console.log((function() {
//Recursive call...how?
})()
);