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
-
var variable = true;
variable = !variable:
function flipBool(poorBool){
return ( poorBool ? false : true; )
}
variable = flipBool(variable);
Some very non usefull examples. 👯 -
All the ways to invert/cast booleans is pretty interesting actually.
~array.indexOf(item)
bool ^=1 -
That weak moment when I googled “how to invert a boolean” - NOT (Wayne's World style)
Related Rants
-
Badr9When I Googled a problem I faced, and found a YouTube video solving it, then tried to thumb 👍 it up, but Yo...
-
baskoros244+ years of programming. Still have no clue how to make my own regex pattern. Every single time I need to, I...
-
JohnScott14I tried to install Pacman on a Linux Mint machine. This is what I got. Dear god I'm an idiot.
That weak moment when I googled “how to invert a boolean”
rant
wk88