0

Recently, while writing a business card site, in order to create a gallery, I used JavaScript. I created the window.number variable in it, but realized that in this case it is better to avoid the global variable. In search for a solution, I came across IIFE. So, I would like to know how exactly the construct (function(){ })() works in JS

I tried to use IIFE, succeeded, but without understanding what I am doing.

PM 77-1
  • 12,933
  • 21
  • 68
  • 111
Maria
  • 1

0 Answers0