Someone really looked at Rock Paper Scissors and thought "yeah, I can solve this with string concatenation." The genius move here is adding the computer's choice (1, 2, or 3) to the player's choice (also 1, 2, or 3) and checking if the result equals specific strings like "11", "22", "33" for draws, or "12" for rock vs paper. The problem? They're concatenating numbers as strings instead of doing actual math. So when computer picks 1 and player picks 2, you get "12" (the string), not 3 (the number). It's technically functional but hilariously cursed. It's like using a sledgehammer to crack an egg - sure it works, but everyone watching is uncomfortable. The real kicker is they're treating what should be simple arithmetic logic (winner = (player - computer + 3) % 3) like some kind of bizarre string matching puzzle. Props for creativity, but my code reviewer would have questions.
Rock Paper Scissors
1 month ago
150,211,915 views
2 shares
javascript-memes, bad-code-memes, rock-paper-scissors-memes, string-concatenation-memes, code-smell-memes | ProgrammerHumor.io
More Like This
I'm Sorry For Making This
1 month ago
39.3M views
1 shares
JavaScript, please
3 years ago
164.3K views
2 shares
Hmm
2 years ago
228.0K views
0 shares
The Unholy Trinity: Frontend, Backend, And The Designer
1 year ago
552.2K views
0 shares
OAuth Done Right
1 year ago
421.3K views
0 shares
Dependency Tree Of Doom: When Your NPM Packages Go Rogue
1 year ago
407.6K views
0 shares
Loading more content...
AI
AWS
Agile
Algorithms
Android
Apple
Bash
C++