Created
July 7, 2016 18:07
-
-
Save andrewjmead/eb9d493d4a4a47bb7ee5a2ae0fef9e93 to your computer and use it in GitHub Desktop.
Adam Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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