## De Morgan's LawSuppose that you need to test a set conditions to see if they are all
if ( ! (today == "Sunday" || today == "Saturday" || today == "Holiday") ) Sometimes the use of the not operator can be confusing
when applied to and and or conditions like this.
The British Mathemetician Augustus De Morgan (1806 - 1871) developed a scheme for
simplifying expressions that use the not operator.
! ( A && B) is the same as (!A || !B) Also note that you can simplify the expression ! ( A == B) by bringing the ! inside of the parentheses and writing ( A != B) So, in the formulation of our code, we could equally as well have written
if ((today != "Sunday" && today != "Saturday" && today != "Holiday") ) |