You're correct. That's why the second half of the expression has || divisiblyBy 400 year. For a number divisible by 400, the first half evaluates to false, then the second half evaluates to true, false || true -> true, so we get true for years divisible by 400.
|| divisiblyBy 400 year
false || true -> true
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.