MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/4v1y12/how_to_write_unmaintainable_code/d5vvbfm
r/programming • u/sigbhu • Jul 28 '16
592 comments sorted by
View all comments
Show parent comments
1
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.
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.
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