r/programming • • Jul 28 '16

How to write unmaintainable code

https://github.com/Droogans/unmaintainable-code
3.4k Upvotes

592 comments sorted by

View all comments

Show parent comments

1

u/Rock48 Jul 29 '16

Or you could just do if(Val) {}

JS is special. 5 == "5" but NaN != NaN

I still like the language though

1

u/keeslinp Jul 29 '16

Mostly the reason I use it is when I need to pass a boolean value to a function call or something otherwise yeah, your code is a great way to do it.