So I'm reading some node.js-modules in a school example app, and they are all instantiated in a function like this:
(function() {
"use strict";
// Some declarations
module.exports = some value;
}());
That is, they are all encapsulated by an anonymous function like this:
(function() {
// Module
}());
Does anyone know what the purpose may be for doing so? Has it something to do with efficiency?