Девятая программа "Вечный вопрос" не всегда срабатывет почему так?

var initialAmount = 250000;
var depositDuration = 14;
var simplePercent = 7;
var complexPercent = 6.8;

for (var i = 0; i <= depositDuration ; i++){
var cdeposit = initialAmount + (complexPercent/100/12)*initialAmount;
}

console.log(cdeposit);

var sdeposit = ((simplePercent/100/12) * depositDuration * initialAmount) + initialAmount;

console.log(sdeposit);

if ( cdeposit > sdeposit){
var recommendedType = ‘complex’;
var finalAmount = Math.round(cdeposit);
}
else{
var recommendedType = ‘simple’;
var finalAmount = Math.round(sdeposit);}

console.log(recommendedType)`