Check more specific conditions first:
// WRONG: score >= 70 is true for 85
if (score >= 70) {
console.log("C")
} else if (score >= 80) {
console.log("B") // Never reached!
}
// RIGHT: check higher scores first
if (score >= 80) {
console.log("B")
} else if (score >= 70) {
console.log("C")
}
When conditions overlap, the first matching one wins. Structure your conditions from most specific to least specific.