We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5347529 commit 7ea3d95Copy full SHA for 7ea3d95
src/reversing-conditions/index.js
@@ -1,7 +1,7 @@
1
export function adjustedCapital(anInvestment) {
2
let result = 0;
3
if (anInvestment.capital <= 0) return result;
4
- if (!(anInvestment.interestRate > 0 && anInvestment.duration > 0)) return result;
+ if (anInvestment.interestRate <= 0 || anInvestment.duration <= 0) return result;
5
result = (anInvestment.income / anInvestment.duration) * anInvestment.adjustmentFactor;
6
return result;
7
}
0 commit comments