Cutting Losses


#1

Please help! I’m getting the right result but it still says theres an error.

The For Loop: Lesson 4: Docking Pay

var payLosses = 0;
var earnings = 0;
for (i=0; i <= 100; i++){
    (earnings += 2.25);
}
var lossesCovered = false;
if (earnings >= 225) {
    lossesCovered = true;
}
var lossesCovered = earnings >= 225;
console.log('Are losses covered? ', earnings >= 225 ? 'Yeah' : 'No');

#2

Is it the lesson checker that is not accepting your solution?


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.