Created
October 25, 2019 10:07
-
-
Save ross-u/6f34b59f84289a81a38bda542fb2c25b to your computer and use it in GitHub Desktop.
JS | OOP - Bank Account - Constructor Exercise
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
function BankAccount { | |
// Your code here .. | |
} | |
/* | |
account instance { | |
balance: ... , | |
user: ..., | |
currency: ... | |
} | |
*/ | |
let account1 = new BankAccount( 100, "Sarah", "$"); | |
let account2 = new BankAccount( 100, "Mike", "$"); | |
account1.depositMoney(200); | |
account1.withdrawMoney(25); | |
account1.showBalance(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment