I've seen this pattern a lot in javascript files:
(function ($)
{
//Perform operation X
}(jQuery));
Is there a difference between placing the above code in a js file vs the following:
function myFunc($)
{
//Perform operation X
}
myFunc(jQuery);
Or is it simply more terse?