Skip to content

Instantly share code, notes, and snippets.

@chrisvest
Forked from igstan/stupid.js
Created December 14, 2011 10:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save chrisvest/1476077 to your computer and use it in GitHub Desktop.
Stupid way to write a negate if statement without the logical negation operator
var b = false;
if (b^b&b|b) {} else {
println("false branch");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment