Answer & Solution
Answer: Option D
Solution:
let declarations are hoisted but not initialized, so accessing a before its declaration results in a ReferenceError. console.log(a); let a = 10;
let variables hoisted?
{ console.log(b); let b = 20; }
let variable in the same scope?
let c = 5; { let c = 10; console.log(c); }
let declarations?
let d; console.log(d); d = 15;
let and const is correct?
let e = 25; function test() { console.log(e); let e = 30; } test();