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
2 months ago
150,235,987 views
2 shares
javascript-memes, bad-code-memes, rock-paper-scissors-memes, string-concatenation-memes, code-smell-memes | ProgrammerHumor.io
More Like This
What’s the worst programming language for beginners?
2 years ago
258.8K views
0 shares
JS devs
4 years ago
187.6K views
0 shares
When My Friend Flexes Their "Advanced" Programming Skills
1 year ago
425.5K views
0 shares
What is this, a crossover episode?
3 years ago
150.6K views
0 shares
We Have Uuid At Home
1 year ago
489.7K views
0 shares
Loading more content...
AI
AWS
Agile
Algorithms
Android
Apple
Bash
C++