Pregunta de entrevista de Vodafone

Advanced Js (What is Closures)

Respuesta de la entrevista

Anónimo

25 jun 2021

A closure is an inner function that has access to the variables in the outer (enclosing) function’s scope chain. The closure has access to variables in three scopes; specifically: (1) variable in its own scope, (2) variables in the enclosing function’s scope, and (3) global variables.