Answer + explication π
.
..
β¦
β¦.
β¦..
β¦β¦
β¦β¦.
Answer: B
ο»ΏWhen you declare variable with let, the scope is block scoped, so when we declare first variable in the if block, the console log will show the first variable declare in this scoped first.
When we go out of this block, and we show another the first variable value, we will show the value in this scope, here itβs the global scope (βHow are you ?β)
When we declare a variable in the block if, and we try to access to it in outer scope (here global scope), the variable is not existing anymore, so we will have ReferenceError since we declare it into if block