Logical Operators
For logical OR, if front expression is true, the rest are skipped.
if (semesterAvg >= 90 || finalExam >= 90)
grade = 'A';
if (semesterAvg >= 90) is true, there is no need to evaluate (finalExam >= 90).
Previous slide
Next slide
Back to first slide
View graphic version