Puzzle 10 of 15 · Block scope
Follow let declarations with the same name inside and outside a block. Predict which binding each console log reads. Choose an output below, then check the explanation. No signup needed. Browse puzzles by topic →
1let name = "outer"; 2{ 3 let name = "inner"; 4 console.log(name); 5} 6console.log(name);
Predict the console output. Each line is a separate log.
outer outer
inner inner
ReferenceError
inner outer