Conditions
if runs code only when a condition is true.
Examplejavascript
Compare with === (equal), !==, <, >. Combine with && (and) and || (or).
Quick check
Which operator checks that two values are strictly equal?
Your turn: write the code
Write a function grade(score) that returns "pass" when the score is 50 or more and "fail" otherwise. Print grade(70) and grade(30).
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.