InVision Interview Question

Describe a closure and how it would be useful?

Interview Answer

Anonymous

Jun 14, 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.