How does this work out to true?


Okay so in one exercise I get this expression;
(((3 * 90) === 270) || !(false && (!false)) || "bex".toUpperCase() === "BEX");

I get the first and third OR expressions. I don't quite get the second OR expression.
How does

!(false && (!false))

evaluate to 'true'? To me it looks like 'true AND false'.


i think is like that
lets beging with the first one
(3 * 90) === 270 which is true
the second is
!(false && (!false)) well we have ! = not..... so !false is equal to true
and then we !(false && true) which is equal to false
at least we have again !(false) which become true
and the last on
"bex".toUpperCase() ==="BEX" who is true

And we have all situation true like that (true || true || true) which is true


The second one is true because the AND logic gate (which is && in javascript) evaluates to true if both arguments are true, for example true AND false = false, but true AND true = true. So because false is false, and (!false) is true, the AND gate will evaluate to false, and !(false) = true, so this would equal true.