It is seemingly a function enclosed in parentheses followed by parentheses. Why?
What is that weird name: function()? Shouldn't function be a reserved name?
I presume that the first line puts true or false into the var HANDJS so that the file is not loaded twice.
The first line sets HANDJS to an empty object if the value evaluates to 0. This is usually done to set it if the value is null. Parameters to a function will get a value of null if they're not spcefied, so code like this is usually used to set default values.
The rest is an anonymous function. They're usually used as callbacks to other functions, like this:
But here it's just defined and called. (Notice the last () which means call that anonymous function). Any variables inside that function will be local when prefixed with "var", so it won't pollute or overwrite other variables with the same name. The purpose is to get a new namespace.
|All times are GMT -5. The time now is 11:32 AM.|