|
|
@@ -3,8 +3,8 @@
|
|
|
// A 90-100, B 80-89, C 70-79, D 60-69, F 0-59
|
|
|
|
|
|
|
|
|
-let gradeCalc = function (studentScore, totalPossibleScore) {
|
|
|
- let grade = (studentScore / totalPossibleScore) * 100
|
|
|
+const gradeCalc = function (studentScore, totalPossibleScore) {
|
|
|
+ const grade = (studentScore / totalPossibleScore) * 100
|
|
|
let letterGrade = ''
|
|
|
if (grade <= 100 && grade >= 90) {
|
|
|
letterGrade = 'A'
|
|
|
@@ -20,6 +20,6 @@ let gradeCalc = function (studentScore, totalPossibleScore) {
|
|
|
return `You got a ${letterGrade} (${grade}%)`
|
|
|
}
|
|
|
|
|
|
-let result = gradeCalc(45.0,100.0)
|
|
|
+const result = gradeCalc(45.0,100.0)
|
|
|
|
|
|
console.log(result)
|