Skip to content

Instantly share code, notes, and snippets.

@donjude-eng
Created March 26, 2021 22:24
Show Gist options
  • Save donjude-eng/026faca141e5f9a87fdf1222d79b322e to your computer and use it in GitHub Desktop.
Save donjude-eng/026faca141e5f9a87fdf1222d79b322e to your computer and use it in GitHub Desktop.
var someName = {
balance: 0
};
function deposit(account, amount){
account.balance += amount;
}
function withdraw(account, balance){
account.balance -= balance;
}
function getBalance(account){
console.info(account.balance);
}
deposit(someName, 3000);
withdraw(someName, 400);
getBalance(someName);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment