Closure: private state
Use a closure to hide a balance variable. Expose only
deposit and getBalance methods so the balance can't be changed from the outside.Premium
JavaScript
Console