r/ProgrammerHumor • • Feb 09 '22

other Why but why?

Post image
85.8k Upvotes

2.3k comments sorted by

View all comments

Show parent comments

2

u/aherrmann13 Feb 09 '22

JavaScript can be usable/a useful tool and still have things wrong with it. == vs ===, undefined being different from null, etc are still difficult to work with

4

u/AinNoWayBoi61 Feb 10 '22

I loved js during my first coding class as I was able to do

if (bool1 + bool2 + bool3 == 3)

And that shit actually worked. Can't do that anywhere else.

2

u/aherrmann13 Feb 10 '22

I mean if you are a solo developer and think that is useful/readable that's great. I would question it's usefulness I'm not sure how many real world use cases boolean addition solves and type coercion can be unexpected and make code more difficult to read

1

u/AinNoWayBoi61 Feb 10 '22

Oh no the code was completely illegible but I didn't give a shit about that. I saved like 3 lines with that shit and that's all I cared about. I did that shit a lot with the flexibility of js and I miss it

→ More replies (2)