JS: Immediately Invoked Function Expression (IIFE)
What is immediately invoked function expression
it means define a function expression and evaluate it immediately.
console.log((function f(x) { return x + 1; })(3)); // 4
can also be done by arrow function.
console.log(((x) => { return x + 1; })(3)); // 4