🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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");
}
  1. A.Distinction
  2. B.First class
  3. C.Pass
  4. 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 →