Created
October 6, 2017 14:42
-
-
Save JaimeStill/fae6bec1b126bf4ea2fb47640952f140 to your computer and use it in GitHub Desktop.
Extra Pay
This file contains 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
getExtraPay() { | |
let extraPay = 0; | |
if (this.debtData.totalDebt > 0) { | |
extraPay = this.debtData.data[0].payoff; | |
this.debtData.data.forEach(d => { | |
extraPay = Math.min(d.payoff, extra Pay); | |
}); | |
} | |
return extraPay; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment