I found some places people are writing JavaScript with starting function (undefined).Can I know why they are writing like this what is the advantage and disadvantage of using like this
(function(undefined) {
/* some logic functions etc..*/
})();