I have a piece of code looking like so:
$(function() {
// some code here to do stuff
})();
Any ideas what the extra () at the end contribute to? With or without them the script works fine.
I’m sure this has been discussed before but I don’t know of a way to code-search SO.
I would say it’s a typo.
Either (JQuery DOM Ready):
Or (Self-invoking anonymous function):