Skip to content

Instantly share code, notes, and snippets.

@andrewjmead
Created July 7, 2016 18:07
Show Gist options
  • Save andrewjmead/eb9d493d4a4a47bb7ee5a2ae0fef9e93 to your computer and use it in GitHub Desktop.
Save andrewjmead/eb9d493d4a4a47bb7ee5a2ae0fef9e93 to your computer and use it in GitHub Desktop.
Adam Gist
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