I was trying to come up with a practical example of information-hiding/encapsulation and this is what my attempt so far
'use strict';
const bank = (accountHolderName, initialDeposit) => {
    let balance = initialDeposit;
    const add = (amount) => {
        balance += amount;
    }
    let subtract = (amount) => {
        balance 

 
    
Top comments (0)