I don't understand this function especially code after body. Please help. This is full code. I understood body part.
(function(global){
//body part
})((this || 0).self || global);
I don't understand this function especially code after body. Please help. This is full code. I understood body part.
(function(global){
//body part
})((this || 0).self || global);
Lets start by breaking it down first we're making an anonymous function (function(){})
Then we're passing in a global variable this is a variable that is set so that it can be accessed within the scope of the application hower the anonymous function needs to have the global variable passed into the scope of the function so it knows to use whatever is passed to it through the global variable: (function(global){})
Then its telling itself to return the result of the function e.g the body part of the code back to the scope of the callback e.g the result of global parameter.
Hope this helps I'm terrible at wording my thoughts apologies if its of no help !