I see the following pattern often:
(function (window, document, undefined) {
//
})(window, document);
undefined is expected but not assigned.
The Purpose is:
You have in any case a local variable undefined with the value 'undefined' (within the function-scope). Even when someone has overwritten the global variable undefined. This variable you can use in places where you want to have the value 'undefined' and exactly that makes me confuse.
Because there's the void-operator in JavaScript which serves exactly the use-case I've described above: To provide reliable the value 'undefined'.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void
So why use developer these undefined-pattern instead of the incorporated void operator?