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
7 hours ago
5,787,616 views
0 shares
javascript-memes, bad-code-memes, rock-paper-scissors-memes, string-concatenation-memes, code-smell-memes | ProgrammerHumor.io
More Like This
Stupid sexy JSON
3 years ago
168.4K views
0 shares
The Difference Between 0 And Null
1 year ago
497.0K views
1 shares
We Never Trusted The Else
1 day ago
108.9M views
0 shares
That's why I don't like web dev
3 years ago
198.5K views
0 shares
Frontend Is Easy And Satisfying
1 year ago
344.8K views
1 shares
End S
1 year ago
339.8K views
0 shares
Loading more content...
AI
AWS
Agile
Algorithms
Android
Apple
Bash
C++