Pergunta de entrevista da empresa InVision

Describe a closure and how it would be useful?

Resposta da entrevista

Sigiloso

14 de jun. de 2018

It's great for data encapsulation. You don't need to expose an internal state (not letting callers to modify it directly) but can let the caller mutate it with a function/getter/setter.