Is there any difference between the following? Do they all work in the same way?
I've seen certain use-cases for .call()
but I've never seen an explanation as to why the function call brackets are either inside or after the anonymous function declaration.
(function() {
}());
^^
(function() {
})();
^^
(function() {
}).call();