r/ProgrammerHumor • • Oct 29 '26

Meme magicQuotes

Post image
2.4k Upvotes

77 comments sorted by

View all comments

Show parent comment

40

u/Foorinick Oct 29 '26

In what situation would you be doing that

98

u/MyAntichrist Oct 29 '26

When you wanna prove a point on how shit JS is, duh.

25

u/ChaseShiny Oct 29 '26

Yeah, that's r/firstWeekProgrammerHumor stuff. We probably should mention something like console.log doesn't actually create a log (with timestamps and such).

3

u/arsenicx2 Oct 30 '26

You know I never thought about the fact they called a print statment console.log I just accepted it.

1

u/ChaseShiny Oct 30 '26

I did the same until I took a class on Python and started talking about logging. You know what's even funnier? The console object even includes different logging levels. You can use console.info or console.error or whatever.

6

u/fghjconner Oct 29 '26

When some api returns a value with a different type than you expect.

4

u/Foorinick Oct 29 '26

Can't you just check if the type is what you want beforehand? Or just... Yk... ===

20

u/tankerkiller125real Oct 29 '26

"Truthy" shouldn't be a thing in any programming language. The fact that Javascript is not just truthy, but inconsistent at best with it is wild. And even more wild is people decided that it was a language they wanted to use in backend infrastructure.

18

u/aabil11 Oct 29 '26

The language was created in a day and the only reason the creator named it that is because Java was popular at the time. And now the entire internet runs on it

6

u/NotADamsel Oct 29 '26

Any language where writing shit like “if foo == True:” is a good idea should be ashamed of itself.

2

u/WithersChat Oct 30 '26

Not quite that, but the weak typing will one day be the death of me.

WHAT DO YOU MEAN YOU ARE COEECING MY ENUM INTO A NUMBER? I LITERALLY OVERLOADED THIS EXACT METHOD TO WORK WITH AN ENUM!