(function() { // Immediately Invoked Function Expression
    let a = 1;
    let b = 2;
    let c = a + b;
    console.log(c);
})();

let a = 2; // This 'a' does not conflict with the 'a' inside the IIFE
Output in the console:
functionName();
function fn() { /* code */ }
function fn() { /* code */ }();
Uncaught SyntaxError: Unexpected token ')'
(function fn() { /* code */ }());
(function fn() {
    /* code */ 
}());

(function fn() {
    /* code */ 
})();
!function fn() {
    /* code */ 
}();

+function fn() {
    /* code */ 
}();

-function fn() {
    /* code */ 
}();
(function () {
    /* code */ 
}());
const fn = (function() {
    console.log("This runs only once.");
}());

// Output: "This runs only once."

fn(); // Uncaught TypeError: fn is not a function
(function(initialValue) {
    let count = initialValue;
    console.log(count);
}(10));

// Output: 10
const sum = (function(x, y) {
    return x + y;
}(5, 7));

console.log(sum); // 12