I make a condition with Else-If to print a line like [You got A+, You got D]. Now I want to store one valid output line in a variable outside the condition.
var gradeMark = Math.round(totalNumber / 6);
//Generate grade mark
if (gradeMark >= 80) {
console.log("You got A+");
} else if (gradeMark >= 70) {
console.log("You got A");
}....
.....
else if (gradeMark >= 0) {
console.log("You got F");
} else {
console.log("It's not valid mark");
}
//Getting grading mark
var validGradeMark =
Aucun commentaire:
Enregistrer un commentaire