DeMorgan’s Laws
Jul 24, 2017 · 1 min read
These can come in handy when refactoring boolean logic.

Or more plainly in code:
!A && !B == !(A || B)
!A || !B == !(A && B)These equivalences can be used to refactor your code to make things easier to understand. It’s not huge change and it won’t rock your world, but every once in a while using one of these substitutions will improve the code.
