8
I have been taught that it is a good practice to always insert a semicolon at the beginning of JavaScript code, as following:
;(function(){
})();
However, many popular JavaScript libraries/frameworks do not use this, such as jQuery, Backbone, etc.
I believe that the semicolon at the beginning is supposed to prevent bad code to break the minified/compressed code, etc. But still, why no one is using it anymore?
Has the semicolon at the beginning turned out to be useless for some reason?