1. (function(){alert("1")})() (function(){alert("2")})() 报错 2. (function(){alert("1")})(); (function(){alert("2")})() 正确
脚本压缩,前端页面要减少脚本数量和脚本大小,所以要把一类的脚本压缩在一起,
为了避免压缩时前一个脚本没有写最后一个分号而导致压缩后脚本不能使用,所以要在开始加一个分号