Did you know that numbers can be truthy or falsy, while text is always truthy?
@wilto explains all the JavaScript:https://abookapart.com/products/javascript-for-web-designers …
-
-
Replying to @abookapart @wilto
!!'' === false, better remove this tweet
3 replies 0 retweets 0 likes -
Replying to @yoshuawuyts
nah, not a string anymore at that point due to type coercion
@abookapart@wilto1 reply 0 retweets 0 likes -
Replying to @bastianalbers @yoshuawuyts
alert(typeof !!'') // boolean
@abookapart@wilto1 reply 0 retweets 0 likes -
yeah the question was also about being "falsy" which it totally is
1 reply 0 retweets 0 likes -
-
Replying to @bastianalbers
gehe, seems we're in agreement then. With almost 50k followers whenever
@abookapart tweets a mistake it's costly
@wilto1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
now the philosophical question: is an empty string still a string? Browser thinks so, so that's that.
@abookapart@wilto1 reply 0 retweets 2 likes
Replying to @bastianalbers
yep exactly. On par with "is the number zero a number?" It is @abookapart @wilto
12:45 PM - 29 Sep 2016
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
