Pergunta de entrevista da empresa IG Group

What is a closure in JavaScript?

Resposta da entrevista

Sigiloso

10 de jul. de 2019

A closure is when an inner function has access to the variables and parameters of its outer function, even after the outer function has returned. To use a closure, define a function inside another function and expose it. To expose a function, return it or pass it to another function.