0 votes
in JavaScript by
Which one of the following can be considered as the opposite approach of the Lexical Scoping?

a) Dynamic scoping

b) Literal scoping

c) Static scoping

d) Generic scoping

1 Answer

0 votes
by

Answer: A

Reason: The dynamic scoping can be considered as the opposite approach to the lexical scoping. In the dynamic scoping, it does not matter that how the code is written but what matters is how's the code executes. At the time of execution of every new function, a new scope associated with it gets pushed onto the stack and this scope normally stored along with the function call stack.At that point, when a variable is referenced in a function's definition, the scope is immediately checked in every call stack to know if it returns a value.

Related questions

0 votes
asked Mar 24, 2021 in JavaScript by sharadyadav1986
0 votes
asked Mar 24, 2021 in JavaScript by sharadyadav1986
...