This is from MDN web docs
(function () {
//statements
})();
But i've seen this usage down below too
(function() {
//statements
}());
It seems both works. But which is best practice and why is there such difference? First one seems more appropriate imo