Original JavaScript Conditional expressions are evaluated as follows. The predicate $\langle p_1 \rangle$ is evaluated first. If its value is false, then $\langle p_2 \rangle$ is evaluated. If $\langle p_2 \rangle$'s value is also false, then $\langle p_3 \rangle$ is evaluated. This process continues until a predicate is found whose value is true, in which case the interpreter returns the value of the corresponding consequent expression $\langle e \rangle$ of the clause as the value of the conditional expression. If none of the $\langle p \rangle$'s is found to be true, the value of the cond is undefined. To evaluate a conditional expression, the interpreter starts by evaluating the $predicate$ of the expression. If the $predicate$ evaluates to true, the interpreter evaluates the $consequent$-$expression$ and returns its value as the value of the conditional. If the $predicate$ evaluates to false, it evaluates the $alternative$-$expression$ and returns its value as the value of the conditional.[2]
 Original JavaScript The word predicate is used for procedures that return true or false, as well as for expressions that evaluate to true or false. The absolute-value procedure abs makes use of the primitive predicates >, <, and =.[3] These take two numbers as arguments and test whether the first number is, respectively, greater than, less than, or equal to the second number, returning true or false accordingly. The word predicate is used for operators and functions that return true or false, as well as for expressions that evaluate to true or false. The absolute-value function abs makes use of the primitive predicate >=, an operator that takes two numbers as arguments and tests whether the first number is greater than or equal to the second number, returning true or false accordingly.
 Original JavaScript Another way to write the absolute-value procedure is (define (abs x) (cond ((< x 0) (- x)) (else x))) which could be expressed in English as If $x$ is less than zero return $- x$; otherwise return $x$. Else is a special symbol that can be used in place of the $\langle p \rangle$ in the final clause of a cond. This causes the cond to return as its value the value of the corresponding $\langle e \rangle$ whenever all previous clauses have been bypassed. In fact, any expression that always evaluates to a true value could be used as the $\langle p \rangle$ here.
 Original JavaScript Here is yet another way to write the absolute-value procedure: (define (abs x) (if (< x 0) (- x) x)) This uses the special form if, a restricted type of conditional that can be used when there are precisely two cases in the case analysis. The general form of an if expression is (if $\langle \textit{predicate} \rangle$ $\langle \textit{consequent}\rangle$ $\langle \textit{alternative}\rangle$) To evaluate an if expression, the interpreter starts by evaluating the $\langle \textit{predicate}\rangle$ part of the expression. If the $\langle \textit{predicate}\rangle$ evaluates to a true value, the interpreter then evaluates the $\langle \textit{consequent}\rangle$ and returns its value. Otherwise it evaluates the $\langle \textit{alternative}\rangle$ and returns its value.[4] If we prefer to handle the zero case separately, we can specify the function that computes the absolute value of a number by writing $\begin{array}{lll} |x| &=& \left\{ \begin{array}{rl} x & \mbox{if x > 0} \\ 0 & \mbox{if x = 0} \\ -x & \mbox{otherwise} \end{array} \right. \end{array}$ In JavaScript, we express a case analysis with multiple cases by nesting conditional expressions as alternative expressions inside other conditional expressions: function abs(x) { return x > 0 ? x : x === 0 ? 0 : - x; } Parentheses are not needed around the alternative expression x === 0 ? 0 : - x, because the conditional-expression syntactic form is right-associative. The interpreter ignores spaces and line breaks, here inserted for readability to align the ?'s and :'s under the first predicate of the case analysis. The general form of a case analysis is $p$$_1 ? e$$_1$ : $p$$_2 ? e$$_2$ $\vdots$ : $p$$_n ? e$$_n$ : $final$-$alternative$-$expression$ We call a predicate $p_i$ together with its consequent expression $e_i$ a clause. A case analysis can be seen as a sequence of clauses, followed by a final alternative expression. According to the evaluation of conditional expressions, a case analysis is evaluated by first evaluating the predicate $p$$_1. If its value is false, then p$$_2$ is evaluated. If $p$$_2's value is also false, then p$$_3$ is evaluated. This process continues until a predicate is found whose value is true, in which case the interpreter returns the value of the corresponding consequent expression $e$ of the clause as the value of the case analysis. If none of the $p$'s is found to be true, the value of the case analysis is the value of the final alternative expression.
 Original JavaScript In addition to primitive predicates such as <, =, and >, there are logical composition operations, which enable us to construct compound predicates. The three most frequently used are these: (and $\langle e_1\rangle \ldots \langle e_n \rangle$ ) The interpreter evaluates the expressions $\langle e \rangle$ one at a time, in left-to-right order. If any $\langle e \rangle$ evaluates to false, the value of the and expression is false, and the rest of the $\langle e \rangle$'s are not evaluated. If all $\langle e \rangle$'s evaluate to true values, the value of the and expression is the value of the last one. (or $\langle e_1 \rangle\ldots \langle e_n \rangle$) The interpreter evaluates the expressions $\langle e \rangle$ one at a time, in left-to-right order. If any $\langle e \rangle$ evaluates to a true value, that value is returned as the value of the or expression, and the rest of the $\langle e \rangle$'s are not evaluated. If all $\langle e \rangle$'s evaluate to false, the value of the or expression is false. (not $\langle e \rangle$) The value of a not expression is true when the expression $\langle e \rangle$ evaluates to false, and false otherwise. Notice that and and or are special forms, not procedures, because the subexpressions are not necessarily all evaluated. Not is an ordinary procedure. In addition to primitive predicates such as >=, >, <, <=, ===, and !== that are applied to numbers,[5] there are logical composition operations, which enable us to construct compound predicates. The three most frequently used are these: $expression$$_1 && expression$$_2$ This operation expresses logical conjunction, meaning roughly the same as the English word and. This syntactic form is syntactic sugar[6] for $expression$$_1 ? expression$$_2$ : false. $expression$$_1 || expression$$_2$ This operation expresses logical disjunction, meaning roughly the same as the English word or. This syntactic form is syntactic sugar for $expression$$_1 ? true : expression$$_2$. ! $expression$ This operation expresses logical negation, meaning roughly the same as the English word not. The value of the expression is true when $expression$ evaluates to false, and false when $expression$ evaluates to true. Notice that && and || are syntactic forms, not operators; their right-hand expression is not always evaluated. The operator !, on the other hand, follows the evaluation rule of section 1.1.3. It is a unary operator, which means that it takes only one argument, whereas the arithmetic operators and primitive predicates discussed so far are binary, taking two arguments. The operator ! precedes its argument; we call it a prefix operator. Another prefix operator is the numeric negation operator, an example of which is the expression - x in the abs functions above.
 Original JavaScript As an example of how these are used, the condition that a number $x$ be in the range $5 < x < 10$ may be expressed as (and (> x 5) (< x 10)) As an example of how these predicates are used, the condition that a number $x$ be in the range $5 < x < 10$ may be expressed as x > 5 && x < 10 The syntactic form && has lower precedence than the comparison operators > and <, and the conditional-expression syntactic form $\cdots$?$\cdots$:$\cdots$ has lower precedence than any other operator we have encountered so far, a property we used in the abs functions above.

[1] Interpreted as either true or false means this: In Scheme, there are two distinguished values that are denoted by the constants #t and #f. When the interpreter checks a predicate's value, it interprets #f as false. Any other value is treated as true. (Thus, providing #t is logically unnecessary, but it is convenient.) In this book we will use names true and false, which are associated with the values #t and #f respectively.
[2] Conditionals in full JavaScript accept any value, not just a boolean, as the result of evaluating the $predicate$ expression (see footnote 1 in section 4.1.3 for details). The programs in this book use only boolean values as predicates of conditionals.
[3] Abs also uses the minus operator -, which, when used with a single operand, as in (- x), indicates negation.
[4] A minor difference between if and cond is that the $\langle e \rangle$ part of each cond clause may be a sequence of expressions. If the corresponding $\langle p \rangle$ is found to be true, the expressions $\langle e \rangle$ are evaluated in sequence and the value of the final expression in the sequence is returned as the value of the cond. In an if expression, however, the $\langle \textit{consequent}\rangle$ and $\langle \textit{alternative}\rangle$ must be single expressions.
[5] For now, we restrict these operators to number arguments. In sections 2.3.1 and 3.3.1, we shall generalize the equality and inequality predicates === and !==.
[6] Syntactic forms that are simply convenient alternative surface structures for things that can be written in more uniform ways are sometimes called syntactic sugar, to use a phrase coined by Peter Landin.
1.1.6   Conditional Expressions and Predicates