Vidyalelo
JavaScript · Q29

Array And Function

Programming · JavaScript · question 29

Q29

What kind of scoping does JavaScript use?

A.
Literal
B.
Lexical
Answer
C.
Segmental
D.
Sequential

Answer: Option B

Solution

Answer: Option B
Solution:
Like most modern programming languages, JavaScript uses lexical scoping. This means that functions are executed using the variable scope that was in effect when they were defined, not the variable scope that is in effect when they are invoked.