You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log(`${bubbaBear.name} earned an average test score of ${bubbaBear.calculateAverageScore()}% and has a status of ${bubbaBearStatus}.`);
56
56
console.log(`${merryMaltese.name} earned an average test score of ${merryMaltese.calculateAverageScore()}% and has a status of ${merryMalteseStatus}.`);
57
57
console.log(`${gladGator.name} earned an average test score of ${gladGator.calculateAverageScore()}% and has a status of ${gladGatorStatus}.`);
58
58
59
-
// Reset Glad Gator's scores for the test
59
+
60
60
gladGator.scores=[75,78,62];
61
61
62
-
// Define the target status
63
-
consttargetStatus="Accepted";
62
+
lettargetStatus="Accepted";
64
63
65
64
lettestsTaken=0;
66
65
67
66
while(gladGator.status()!==targetStatus){
68
-
// Increment the test score by 5 (or any other increment you prefer)
67
+
69
68
constnewScore=gladGator.scores[testsTaken%3]+5;
70
69
71
-
// Ensure the score doesn't exceed 100
70
+
72
71
if(newScore<=100){
73
72
gladGator.scores[testsTaken%3]=newScore;
74
73
testsTaken++;
75
74
}else{
76
-
break;// Break the loop if the score cannot be increased further
0 commit comments