user2304828 user2304828 - 3 months ago 21
Javascript Question

what dose this code mean?(window), function (a, b, c)

what does this code mean?
I saw the code on some website. I don't know how it works.
I have simplified the code.

(window), function (a, b, c){}


Read this, there are a something like:

!function(a){console.log(a+" First")}(window),
function(a){console.log(a+" Second")}(window),
function(a,b,c){console.log(a+' '+b+' '+c)}("MI_STD_CRYPTED","MI_GOODS_ID",window);

Execute the block above in the console of your browser.

In your script:


i.e. we run an anonymous function with parameters in the round brackets, an anonymous function accepts these parameters as arguments:

function(a,b,c){console.log(a+' '+b+' '+c)}("this will be a","this will be b","this will be c");