Pergunta de entrevista da empresa Vodafone

Advanced Js (What is Closures)

Resposta da entrevista

Sigiloso

25 de jun. de 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.