@wallhackio What's IIFE?
@vaporeon_ Immediately-Invoked Function Execution! (some people pronounce it as "iffy", I just say "eye eye eff ee")
It's a function that you declare and execute simultaneously :D
@vaporeon_ it's a functional programming thing and it only seems to be common in JavaScript
Here is an example:
const fib_20 = (function fibonacci(n) {
if (n === 0) return 1;
if (n === 1) return 1;
return fibonacci(n - 1) + fibonacci(n - 2);
})(20);
@vaporeon_ A more practical example I ran into occurred when I implemented an HTTP/HTTPS request library. Internally I used a recursive IIFE to automatically redirect response with 3xx status codes