0

What is this type of syntax called in javascript?

 (function(){})()

and this

  !function(){}()

I'd like to do a search to learn about them but I don't know what I'm searching for.

Also if anyone can provide link to a useful recourse that would be great.

zzzzBov
  • 174,988
  • 54
  • 320
  • 367
andrew
  • 9,313
  • 7
  • 30
  • 61

1 Answers1

0

This is the syntax for IIFE (Immediately Invoked Functions in Javascript).

This is a great article that should clear all your doubts:

http://benalman.com/news/2010/11/immediately-invoked-function-expression/

pj013
  • 1,393
  • 1
  • 10
  • 28