What would this JS code print? 🤔

Haseeb - Mar 9 '20 - - Dev Community

What do you think this piece of code will print? Most of you might know the answer but the behavior is really interesting to me and got me thinking and learning about a very important concept in JS.

function saySomething() {
    var greeting = "Hello";
    {
        greeting = "Howdy";
        let greeting = "Hi";
        console.log(greeting);
    }
}
saySomething(); //what would this print?
. . . . .
Terabox Video Player