2

What's the difference between Lexical Environment and the Global Environment ?

from what i've seen the lexical environment contain environment record and outer reference to the outer lexical environment if that so.

if the outer reference has a reference to the parent lexical environment so that's mean that the Global Environment is also a lexical environment does it ? because if i call a function that was declared inside the Global Environment.

the outer reference should be a lexical environment so that's mean the Global Environment is a lexical environment.

AngryJohn
  • 434
  • 1
  • 10
  • Check out this link to see if it helps [Variable Environment vs lexical environment](https://stackoverflow.com/questions/23948198/variable-environment-vs-lexical-environment) – Ridwan Ajibola Sep 27 '21 at 21:12

0 Answers0