I think userPassedCourse should be called userFailedCourse. Or at least, having a low mark suggests or low attendance suggests failure. But then, you switch passing false to passing true from one example to the next, so even if you are trying to refactor it to make it more readable, I'm getting really confused by the example.
I think
userPassedCourse
should be calleduserFailedCourse
. Or at least, having a low mark suggests or low attendance suggests failure. But then, you switch passingfalse
to passingtrue
from one example to the next, so even if you are trying to refactor it to make it more readable, I'm getting really confused by the example.Changed to:
user.result > 40 && user.attendance > 50