Skip to content
Skills
Problems
Questions
Roles
Skills
Interview
Contest
Leaderboard
Problems
Questions
Roles
Skills
Interview
Contest
Leaderboard
Home
/
Frontend Developer
/
Easy
/
Block scope of let
easy
5 pts · first answer counts
javascript
scope
Block scope of let
What does this code print?
let x = 1 if (true) { let x = 2 } console.log(x)
Choose one answer
A.
2
B.
1
C.
undefined
D.
It throws a SyntaxError
Submit answer
Report a problem
← Width with border-box
Loose vs strict equality →