In the following code, what does the last line do (the bit within the parenthesis)?
- Is it related to Javascript closures?
- Is it returning a variable?
- Is there a way to write this code without using this short-hand?
Thanks!!
(function (window, $, my, undefined) {
'use strict';
if (!$) { throw 'jQuery not found.'; }
my.someNamespace = {
bla:null,
blabla:null,
init: function(){},
bind: function(){}
};
} (window, $, window.my = window.my || {}));