this post was submitted on 28 Oct 2024
1 points (100.0% liked)
Programming Humor
2652 readers
4 users here now
Related Communities [email protected] [email protected] [email protected] [email protected]
Other Programming Communities [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
How I would have done it without the
==
Don't know why their code returns false when they are equal but I'm not going to dig through old code to refactor to use true instead of false.
you can also use XOR operation
I was debating on bitwise operations, but decided on super basic if statements which I think the compiler would optimize, happy to see the logical operation form too