//Do not declare variable marks.
if (marks > 90) {
    console.log("AA");
} else if (marks > 80 && marks < 90 ) {
    console.log("AB");
} else if (marks > 70 && marks < 80 ) {
    console.log("BB");
} else if (marks > 60 && marks < 70 ) {
    console.log("BC");
} else if (marks > 50 && marks < 60 ) {
    console.log("CC");
} else if (marks > 40 && marks < 50 ) {
    console.log("CD");
} else if (marks > 30 && marks < 40 ) {
    console.log("DD");
} else if (marks < 30) {
    console.log("ff");
}