0

I came across with a piece of code with new syntax for me, What this syntax means in js? I mean this parentheses at the beginning:

(function () {
   //...
})()
Plompy
  • 359
  • 3
  • 11

1 Answers1

1

It's called IIFE

basically, you can define a a function and invoke it immediately without declaring a name for it.

dor272
  • 550
  • 1
  • 6
  • 26