r/ProgrammerHumor • • 22d ago

Meme programmingLanguagesWhenYouAskThemToDoSomthing

Post image
1.6k Upvotes

224 comments sorted by

View all comments

Show parent comment

29

u/throwaway563125685 21d ago

in javascript (!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]] and "tears" are the same thing, and that was done on accident

7

u/STEMpsych 21d ago

Holy shit.

5

u/namitynamenamey 20d ago

This is the most cursed thing I've seen since I read how numbers are defined in set theory. Javascript has no right to approach set theory with broken casting.

5

u/Thesaurius 20d ago

I am not surprised that they are equal, because that's just how JavaScript rolls. But ON ACCIDENT?

6

u/throwaway563125685 20d ago

yyyup. the JS type casting system is broken af

it's called JSFuck (because it looks like BrainFuck) and not only can you write any string with it, but you can also make the function constructor, meaning you can execute any string.

see also : https://jsfuck.com/