I have been looking at other people"s code recently, and I feel that it is cloudy and hazy. I don"t quite understand it. I would like to bother you to explain it, because it is too general to explain on the Internet. Please
(function($,owner) {
//
owner.back = function(){ }
})();
first question: can the method owner.back be called globally? For example, this method is written in app.js, I want to use this back method in other js, can it be used directly?
(function($,owner) {
//
owner.back = function(){ }
})(window.Base64 = {}));
second puzzle : window.Base64 = {}) what does it mean to put it in this position, and what does it do? Thank you! The search for this tail () on the site is if the description is an expression, if it is an expression, then what is the expression for?
and there are many ways to write it:
(function($,owner) {
//
owner.back = function(){ }
})(mui, window.storage = {}));
(function($,owner) {
//
owner.back = function(){ }
})(mui, window.menu = {}));
(function($,owner) {
//
owner.back = function(){ }
})(window.secret = {}));
Thank you!