Skip to content
RED SAGSkills
easy5 pts · first answer countsjavascriptscope

Block scope of let

What does this code print?

let x = 1
if (true) {
  let x = 2
}
console.log(x)
Choose one answer