javascript - (function(){})() vs. !function(){}() -
this question has answer here:
- what exclamation mark before function? 7 answers
in jquery javascript code see
(function(window, undefined) { })(window);
and in twitter
!function(window, undefined) { }(window);
can tell difference between these 2 approaches is?
using ! operator before function causes treated expression, can call it:
!function() {}()
http://jasonlau.biz/home/faq/what-is-the-exclamation-mark-used-for-in-code
Comments
Post a Comment