Reading an example from a book, can someone explain how the function call to fibonacci takes in the argument \'i\' when the function itself doesn\'t declare any parameters?<
var fibonacci = (function() {
...
return fib;
})();
This is a self-executing function.
It declares a function expression which returns a function (fib), executes the outer function expression immediately (()), and assigns its return value (which is fib) to the fibonacci variable.