loading...

Discussion on: Tips on naming boolean variables - Cleaner Code

Collapse
paddy3118 profile image
Paddy3118

You can also use gt, ge, lt, le, eq then a number as prefixes for greater-than, greater-than-or-equal, less-than, less-than-or-equal, equal

Something like:

le3Active = activeCount(active) <= 3
gt4Active = activeCount(active) > 4