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

378
Vistas
which is the outer lexical reference and callee of the class constructor?

I'm figuring out the lexical environment of the constructor in class.

class Func {
  constructor() {}
}

As far as I concerned, new Func() would call the internal method [[Construct]] which refers to Func.prototype.constructor and it points at Func at the end.

The point is, what would be the Outer Lexical Environment Reference of this constructor? and how the Execution Context goes on this?

For example, when you try to make a new Promise, an example starts like this;

const foo = new Promise((resolve, reject) => {
  setTimeout(() => {
    resolve('good');
  }, 5000);
});

new Promise() calls [[Construct]] in Promise, and it goes to Promise.prototype.constructor() which is exactly same as Promise.

At this moment, does the executed constructor behave as it is called from the global scope? It is very vague for me to figure out who's calling who.

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