Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Root775131yI don’t think so.
Zero should, but negatives are “present” (to use a Rubyism) so they would be truthy. -
no but you can make -1 (which is returned when you try to find something in an array and it isn't in the array) be false using ~
false is on 0, positive and negative numbers have bits in them therefore will evaluate to true -
I bet there are countless js devs who write code which relies on this and they think that they are super clever 10x devs.
-
Parzi82301yI'm pretty sure the true/false comparison compares to 0 exactly. Python does the same thing, and it lets you get up to some useful signaling bullshit (return either False or an object, easier to check for than NoneType because you can "if not var:" and NoneType is still an object so this check will fail)
-
I want to share my story to raise awareness and educate those who are experiencing financial losses due to scams, such as binary options, dating scams, real estate fraud, and fake ICOs. I personally lost around $85,000 to an IQ Option broker and two fraudulent binary option websites. However, I was able to recover all my lost funds with the assistance of a professional recovery service. It is possible to recover your money lost to scams, and I want to offer hope to others who are in a similar situation. You can reach out to EarthHackers via email at EarthHackers@proton.me, Telegram (EarthHackers), or WhatsApp (+16625189219) for help in recovering your funds.
Mandela effect
I swear negative numbers used to evaluate as false in Javascript?!
Wtf ?! 😳
rant
mandela effect
javascript