← Quiz: JavaScript Basics: all 9 questions
Quiz: JavaScript Basics · Question 7 of 9
What does this print? (code)
What does this print?
const marks = 72;
if (marks >= 75) {
console.log("Distinction");
} else if (marks >= 60) {
console.log("First class");
} else {
console.log("Pass");
}
- A.Distinction
- B.First class
- C.Pass
- D.Distinction First class
Answer & explanation
Correct answer: First class
72 fails the first check and passes the second; only one branch runs.
Can you get the rest right without peeking?
Take the timed Quiz: JavaScript Basics quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →