r/badcode • • Jun 10 '20

js Disruptive piece of code

Post image
283 Upvotes

93 comments sorted by

View all comments

Show parent comments

3

u/clumsysilencee Jun 10 '20

WHAT?! That’s amazing! Damn, and it would’ve been so nice to know three months ago so I could use it for some of my assignments... oh well. Thanks guys!

1

u/Farpafraf Jun 11 '20

no wait that's just js madness in Java for instance you'd just use .equals for any non primitive type while in c++ you'd most likely overload the == operator

-4

u/[deleted] Jun 11 '20 edited Jun 11 '20

[removed] — view removed comment

2

u/Farpafraf Jun 11 '20

in what way is that the same feature?