Regarding immediate function in JS. What is the difference between this syntax
(function() {}());
and
(function() {})();
I especially do not understand the use of the last part ()
in the second example.
Could you provide me a quick explanation together with a sample of code on how to use an immediate function with this different syntax?