This question already has an answer here:
I see a piece of javascript code in my nodejs application.
( function() { console.log("gg") } )(this)
I would like to know why use => ( function(){} )(this) this type of structure, and how does this compile. Thank you!
I am understanding why we have this two brackets ()(), and why this code would work.
(this)
is passed?!? – DOC ASAREL Mar 7 '14 at 18:35