Use
&&
instead of and
. 1if 1 > 2 and 2 < 3 2end
3
4(1..100) === 7
Description
and
and or
appear very low in the operator precedence table,
and hence, should not be used, lest they should introduce unintended
bugs. &&
and ||
should be used instead.
Bad practice
foo.save and return
Recommended
foo.save && return