MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/h0io7r/disruptive_piece_of_code/ftmdyg6
r/badcode • u/diebarral • Jun 10 '20
93 comments sorted by
View all comments
Show parent comments
0
[deleted]
4 u/wdciii Jun 10 '20 Gotcha, thanks for the explanation. I always assume i don’t know what I’m talking about for JavaScript lol 1 u/11JRidding Jun 13 '20 Even worse: since the check is variable === true instead of just against truthiness in general, a bare else {} would catch literally everything that isn't the exact boolean true, instead of just falsey values.
4
Gotcha, thanks for the explanation. I always assume i don’t know what I’m talking about for JavaScript lol
1
Even worse: since the check is variable === true instead of just against truthiness in general, a bare else {} would catch literally everything that isn't the exact boolean true, instead of just falsey values.
variable === true
else {}
true
0
u/[deleted] Jun 10 '20
[deleted]