Direct call and indirect call of eval
behave differently
#327
Labels
new-example
A proposal of the new example
eval
behave differently
#327
When calling
eval
indirectly, it uses the top scope. This means you can access the top scope variables even in a local scope where the same variable name is redefined. (Note that the variable is defined withlet
, so it is not a property of the global object.)This behavior is explained in the MDN documentation on eval.
The text was updated successfully, but these errors were encountered: