semicolon usage in javascript [duplicate]
Possible Duplicate:
Why does the JavaScript need to start with “;” ?
I've been looking at some JavaScript in the new Microsoft patterns and practises project Silk on codeplex and I've come across something I've never seen before...
What is the the purpose of the semicolon before th开发者_运维百科e self executing function containing a jQuery plugin?
; (function (mstats, $) {
// blah blah blah...
} (this.mstats = this.mstats || {}, jQuery));
It's to avoid any potential problems if you concatenate/compress/minify your javascript files into a single one.
This is just a coding practice to make sure that last statement had a semicolon at its end and as told by Darin
精彩评论