Simple questions I've always wondered.
I started with angular without a vanilla javascript background I'm pretty sure that's that this is, but sometimes I see javascript files that have the:
(function() {
'use strict';
....
})();
at the start and finish of a file like:
(function() {
'use strict';
angular.module('asdf', []);
angular.controller('asdf' function(){.....})
})();
I don't use it and and everything runs fine. So my question are there any benefits by wrapping my javascript files inside of them?