Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project 07 Completed #1

Merged
merged 1 commit into from Apr 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 3 additions & 24 deletions exercise1.js
Expand Up @@ -39,30 +39,9 @@ var customersObj = {
}
};

























function displayBalance(customerID){
return ("$" + (customerID.balance).toFixed(2));
};



Expand Down
30 changes: 10 additions & 20 deletions exercise2.js
Expand Up @@ -50,26 +50,16 @@ var customersObj = {
};






















function getCustomer(customerID){
var first = customerID.name.first;

if(first != "Ulquiorra"){
var last = customerID.name.last;
return first + " " + last;
}else{
return first;
}
};



Expand Down
47 changes: 20 additions & 27 deletions exercise3.js
Expand Up @@ -26,64 +26,57 @@ var customersObj = {
'last': 'Kurosaki'
},
'customerID': 23567,
'balance': 153677345
'balance': 153677345,
'title': 'Substitute'

},
1234: {
'name': {
'first': 'Gin',
'last': 'Ichimaru'
},
'customerID': 1234,
'balance': 1235412356
'balance': 1235412356,
'title': 'Captain'
},
1531: {
'name': {
'first': 'Shunsui',
'last': 'Kyoraku'
},
'customerID': 1531,
'balance': 65432467
'balance': 65432467,
'title' : 'Captain'
},
543: {
'name': {
'first': 'Kisuke',
'last': 'Urahara'
},
'customerID': 543,
'balance': 63463723562
'balance': 63463723562,
'title': 'Shopkeeper'
},
667: {
'name': {
'first': 'Ulquiorra'
'first': 'Ulquiorra',
'last': 'Cifer'
},
'customerID': 667,
'balance': 4562647745
'balance': 4562647745,
'title' : 'Espada 4'
}
};
























function transaction(customerID, amount){
var first = customerID.name.first;
var last = customerID.name.last;
var balance = amount + customerID.balance;
var title = customerID.title;
return title + " " + first +" "+last+ " balance is now $"+ "balance";
};



Expand Down