Just looking throug some js code file that has all it's code wrapped like that:
(function(self) {
//..
})(typeof self !== 'undefined' ? self : this);
Can you explain what is the javascript code above means:
What is self
and where it is coming from?
What is the last line is actually does (typeof self !== 'undefined' ? self : this);
?