r/ProgrammerHumor • • Jan 16 '14

[deleted by user]

[removed]

1.3k Upvotes

446 comments sorted by

View all comments

Show parent comment

3

u/hbdgas Jan 16 '14 edited Jan 16 '14

Since the else if is following if (divisibleBy5), you don't really need to check !divisibleBy5 in it.

Edit: Also, since after making that change you'd then only be using divisibleBy5 once, you might as well just put the calculation directly into the if statement to free up that variable. But yours is really fine like it is for readability.