You are troubleshooting a web page that includes the following code segment.
You need to evaluate the value of the variable x.
What will be displayed in the user interface?
A.
0
B.
1
C.
2
D.
An error
You are troubleshooting a web page that includes the following code segment.
You need to evaluate the value of the variable x.
What will be displayed in the user interface?
A.
0
B.
1
C.
2
D.
An error
At first I thought it was C, but A is correct.
https://www.w3schools.com/js/js_scope.asp