Created
December 19, 2016 01:48
-
-
Save anein/911ecb4c82c763b6de8f3386a3075eff to your computer and use it in GitHub Desktop.
IIFE variations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1 | |
( function IIFE(){/*...*/} )(); | |
// 2 | |
( function IIFE(){/*...*/}() ); | |
// 3 | |
( function(){/*...*/} )(); | |
// 4 | |
( function IIFE( global ){/*...*/} )( window ); | |
// 5 | |
( function IIFE( undefined ){ | |
var a; | |
if( a === undefined ){/*...*/} | |
} )(); | |
// 6 | |
( function( def ){ | |
def( window ); | |
} )( function def( global ){/*...*/} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment