Created
August 30, 2018 17:00
-
-
Save enigmatikme/57d3027efb381efb0d4775762caef370 to your computer and use it in GitHub Desktop.
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
//No pseudocode as requested by prompt | |
function CashAmount(val) { | |
this.val = val; | |
console.log(this.val); | |
} | |
CashAmount.prototype.totalInPennies = function(val) { | |
return this.val * 100; | |
} | |
CashAmount.prototype.quantityOfEachDenomination = function() { | |
var denominations = {}; | |
} | |
CashAmount.prototype.addDoubleAmount = function(val) { | |
var newVal = this.val + val; | |
console.log(newVal); | |
this.totalInPennies(newVal); | |
this.val = newVal; | |
return newVal; | |
} | |
CashAmount.prototype.toDoubleString = function() { | |
var stringify = this.val; | |
return stringify.toString(); | |
} | |
CashAmount.prototype.toDouble = function(val) { | |
var newVal = this.val + val; | |
this.totalInPennies(newVal); | |
return this.val + val; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment