JS-LAB
Learn
Practice
Interview
Playground
Community
Sign in
Get Started
Question 4 of 10
All Topics
Medium
What will be the output of the following code?
1
2
3
4
5
6
let
x =
10
function
foo
() {
console.
log
(x)
let
x =
20
}
foo
()
A
10
B
20
C
undefined
D
ReferenceError
Next Question
Skip