Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

225
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda