Possible Duplicate:
What does the exclamation mark do before the function?
So I've come across the use of the following by the twitter share button code:
!function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = "//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
}
}(document, "script", "twitter-wjs");
And I was just wondering what the !function
bit does.
I'm guessing is short for (function(){...})();
but I couldn't find anything online to confirm it.