Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

229
Views
One more time about Lexical Environment vs Execution Context in JS

I've already read :

What is the difference and relationship between execution context and lexical environment?

Lexical environment and function scope

https://262.ecma-international.org/6.0/#sec-lexical-environments

https://262.ecma-international.org/6.0/#sec-execution-contexts and more...

Just want to clarify one final time for myself. What is the actual difference between Lexical Environment vs Execution Context?

Am I right that they're absolutely the same thing, but Execution Context is actually one of Lexical Environments in our code that is currently on the top of our callstack??

So let's say we have

1 function one() {
2  return
3 }
4
5 function two() {
6  one()
7 }
8
9 two()

First we have out global context in the stack, it's currently our Execution Context. Browser starts running our code, goes down to line 9 and put function two() on the top of the call stack. So now our Execution Context is the Lexical Environment of this function. Is that correct or am I missing smth? Thanks for help!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!