let stayInside = !(isRaining && isCold);
Using De Morgan’s Law (!(A && B) is equivalent to !A | !B), so the simplified version of Expression 1 is: |
let stayInside = !isRaining || !isCold;
let stayInside = !(isRaining || isCold);
Using De Morgan’s Law (!(A | B) is equivalent to !A && !B)so the simplified version of Expression 2 is: |
let stayInside = !isRaining && !isCold;