Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
mapimopi
11y ago
0 comments
Save
Share
Why not just
if (i % 3 != 0 && i % 5 != 0)
this extra boolean variable out?
0 comments
1 comments · 1 top-level
top
newest
oldest
ivanche
11y ago
I like to think it's matter of readability. "if (pureNumber)" vs. "if (i % 3 != 0 && i % 5 != 0)". Also, one extra variable vs. reversal of already mentioned condition. Yes, we're splitting hair here :)
j
/
k
navigate · click thread line to collapse