0

Can anyone please explain what is the meaning/use of this following expression in JavaScript.Is it advantageous ?

; (function() {....//..... }());

Note the use of semi-colon before the function declaration.Can it be used , I know its related to IIFE(immediately invoked function Expression)...Can Someone shed some more light on the usage of these declarations.

Paramveer Singh
  • 51
  • 1
  • 10
  • Try to use 2 IIFEs or a function followed by an IIFE. It will throw an error. Intermediate value does not exists. For this it a good convention to use `;` before IIFE – Rajesh Mar 15 '17 at 09:03
  • 1
    @bergi that is what i was searching to close it as duplicate. – Jai Mar 15 '17 at 09:03

0 Answers0