javascript - differences between binding and not binding parameter at function call -


what differences between followings:

method 1:

(function( $, window, document, undefined ) { ....... })( jquery, window, document ); 

method 2:

(function( $, window, document, undefined ) { ....... })(); 

in both functions, there local variables $, window, document , undefined

inside first function have passed in values (except undefined, undefined).

inside second function, undefined (and still mask global variables same name).


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -