goldis
10/4/2019 - 6:43 AM

04_hoisting

console.log(sum(1, 41));

function sum(a, b) {
    return a + b;
}

var i;
console.log(i);
i = 42;
console.log(i);

console.log(num);
let num = 42;
console.log(num);

// Function Expression & Function Declaration

function square(num) {
    return num ** 2;
}

var square = function(num) {
    return num ** 2;
};

console.log(square(25));