举个例子吧 var fn =function(){ alert('test'); }; fn(); 换言之等价于 (function(){ alert('test'); })(); 转载于:https://my.oschina.net/u/2353835/blog/551177