He does not pass again. On the last line, the closure gets PaymentOffersOverview , because it self- PaymentOffersOverview . If it was not accepted, PaymentOffersOverview within the closure will be undefined .
// definition of local variable var PaymentOffersOverview = PaymentOffersOverview || {}; (function(param) { // now we are in the context of the closure where param refers to // PaymentOffersOverview, yet PaymentOffersOverview is not defined // within this scope. It is param. // You can use any name here, using the same is just for convinience. var App = {}; App.Settings = { Id: some Id value // Some Code }; App.ShowLoader = function (message) { // Some Code }; param.App = App; })(PaymentOffersOverview); // passing of the variable
source share