A normal self-invoking function looks like this:
(function () {
// Something.
})();
However, can a function somehow invoke itself in a recursive manner like this:
(function f(i, num) {
if (num > 0) {
console.log(i);
f(i + 1, num - 1);
}
})(0, 2);
but still remain anonymous?
Also
Can an ES6 arrow function invoke itself?
(a => {
// Somehow invoke itself.
})();