this is a description of my new blog created with Gatsbyjs
var foo = "foo1";
(function() {
var foo = "foo2";
console.log(foo); // foo2
})();
console.log(foo); // foo1
// we can also write the above statement like:
(function() {
// code
}());We use IIFE in order to not pollute the global scope.
Bibliography: <br/ > Ben Alman: Immediately-Invoked Function Expression (IIFE)