This seems to be a collection of misused “best practices” that did not lead to exceptions, but definitely strange and obscure. Look at the second and last lines. Best practice is used exactly the opposite:
(function ($, undefined){
undefined here will be real undefined because there is no second argument when calling the function. But what on Earth could be the reason to pass the argument "undefined" to a function and not use it? This is like a prank.
The same applies to the 5 lines: it looks (and actually acts) as a "default argument", which is assigned, but done in a strange way (traditionally and, more obviously, it is used as location = location || {}; ). I believe that only reasons to write in this way can be confusing, joking, or misunderstanding.
The same thing happens with 100% . You can use any operators to specify a function expression. The most common way is to use parentheses. But often you can also meet:
!function(){ }();
or:
+function(){ }();
but you can also write
42 * function(){ }();
all this works the same way, only the brackets are the most obvious and common.
source share