CJCoding With Joseph
← Back to Question List
JavaScript Code Walkthrough #15

Two Ternary Expressions

easyOperators

📄 Code

Read carefully — what does this print?
1let score = 72;
2let grade = score >= 60 ? "pass" : "fail";
3console.log(grade);
4let n = 4;
5console.log(n % 2 === 0 ? "even" : "odd");

🎯 Your Answer