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
Post a Comment