Skip to content

Commit 7b652cd

Browse files
committed
feat: updated function due to lint errors
1 parent 23367a9 commit 7b652cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lesson_07/conditionals/src/lesson7.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function compareStrings(a: string, b: string): number {
4545
* @return The letter grade ("A+", "A", "A-", "B+", etc.).
4646
*/
4747
export function convertGpaToLetterGrade(gpa: number): string {
48-
if(gpa === 4.0)
48+
if(gpa >= 4.0)
4949
return "A";
5050
else if (gpa >= 3.7 && gpa <= 3.99)
5151
return "A-";
@@ -65,7 +65,7 @@ export function convertGpaToLetterGrade(gpa: number): string {
6565
return "D+";
6666
else if(gpa >= 1 && gpa <= 1.29)
6767
return "D";
68-
else (gpa === 0.99)
68+
else //(gpa === 0.99)
6969
return "F";
7070
}
7171

0 commit comments

Comments
 (0)