var myLibrary {
	greet: "Have a nice time",
	doSomething(): function() { .. }
	doSomethingElse(): function { .. }
}
var a = 2;

// We start the function with `(` treated the function as function declaration
(function foo() { 
	var a = 3;
	console.log(a); //3
})(); // This is added to execute the function on the spot (IIFE)

foo(); // foo is not defined
setTimeout( function() {
	console.log("I waited 1 second!");
}, 1000);
var a = 2;

(function IIFE(global) {
	var a = 3;
	console.log(a); // 3
	console.log( global.a ); // 2
})( window );

console.log( a ); // 2
var obj = {
	a: 1,
	b: 2,
	c: 3
};

// using with()
with(obj) {
	a = 2;
	b = 3;
	c = 4;
}

a; // not defined
try {
	undefined();  // illegal operation to force error
} catch (err) {
	console.log(err);  // works!
}

err; // not defined
{
	let hello = "world";
}

hello; // not defined