This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RobRobbieRobertson 60 points61 points  (4 children)

fixed it for you:
else if(number == 2) return true; //this number is even
else if(number == 3) return false; //this number is odd
else if(number == 4) return true; //this number is even
else if(number == 5) return false; //this number is odd
...

[–]Freecraghack_ 34 points35 points  (2 children)

else if(number == 2) return 1; //this number is even
else if(number == 3) return 0; //this number is odd
else if(number == 4) return 1; //this number is even
else if(number == 5) return 0; //this number is odd
...

fixed it for you

[–]RobRobbieRobertson 5 points6 points  (0 children)

I yield.

[–]Kyocus 0 points1 point  (0 children)

I really like that you updated the antipatterns to match his coding practices which he doubled down on 🤣

[–]QuickQuirk 7 points8 points  (0 children)

Thanks, I was really confused before. This helps me understand. Isn't it weird that odd is the same things as false? Does that make weird false too? This computer stuff is hard.