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
  • 339
  • 2
  • 10

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
  • 450
  • 6
  • 20