I'm learning about the alternate variable declarations introduced in ES6. Right now, I have learned that the 'let' variable declaration is block scoped, and although it can be updated, it cannot be re-declared in the same scope.
My first question is: Is the above information true? I am reading an article from April 2, 2020. Things may have changed.
My second question is: If the above information is true, then how come in my Chrome console, when I run
let greeting = 'hello';
and the following line I re-declare it such as
let greeting = 'say hi now';
the value is changed to 'say hi now' and no error is reported.
I'm thinking it has something to do with the semicolon at the end of the line, but not sure. Just a JS noobie here. Thanks!