Can somebody explain to me what this does in javascript?
(function (x,y){}(x,y));
or this
// global import
(function ($, YAHOO) {
// now have access to globals jQuery (as $) and YAHOO in this code
}(jQuery, YAHOO));
I have never seen something similar in other languages like java or c++
function(x, y) { }is an anonoymous function.(x, y)calls that function, passingxandyas parameters.