I have found this code snippet:
;
100% function($) { // WTF?
var _true_ = true; // WTF?
var _false_ = false; // WTF?
var go = function(location, date) {
location || (location = {});
var result = _false_;
if (date && date.day) {
result = geoService.go(location, date);
}
return !!result;
}
var process = function(func) {
var args = [].prototype.slice.call(arguments, 1);
return function() {
return func.apply(this, args);
}
}
// ...
}(jQuery, undefined);
In here: http://www.dofactory.com/products/javascript-jquery-design-pattern-framework (sorry, no id-s have been found on the page)
I don't understand what these parts are doing:
- the "100%" in the second line
- the
var _true_ = true;andvar _false_ = false;assignments in the 3-4 lines
I'm curious, what is the purpose of these.