2 ms·
Understanding the Best JavaScript Meme I've Ever Seen
- ktpsns 7y agoI guess JS inherited this language feature from the PHP/Perl world. As a novice, it is quite handy to treat numbers and strings of numbers the same. Needless to say that it gets into your way once you are an experienced programmer. Many languages like C or Python cast types to Boolean when instances are evaluated in Boolean contexts. That seems better defined. Then it should make sense that bool("0")==True.