HTML and CSS Reference
EXPLANATION ( CONTINUED )
If the value of answer is any one of McDonald's or Taco Bell or Wendy's , the state-
ment enclosed within the curly braces is executed: An alert box appears display-
ing No fast food today, thanks . (See Figure 5.14.) If the user enters any other value,
Figure 5.13 The user enters a value.
Figure 5.14 If the user enters any one of the values in line 2, this alert box appears.
The ! Operator (Logical NOT). In the English statement “That's not true!” the
the NOT ( ! ) operator for negation. The ! operator is called a unary operator because it
has only one operand; for example, ! true or ! 5 . It returns true if the expression evaluates
to false and returns false if the expression evaluates to true. See Table 5.14.
Table 5.14 Logical NOT Examples
What It Evaluates To