Skip to content

Commit 6ef2d6e

Browse files
authored
fixes #776 (#1033)
1 parent 8a8c350 commit 6ef2d6e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

xml/chapter1/section1/subsection6.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ abs(-5);
231231
<META>alternative-expression</META> and returns its value as the value of the
232232
conditional.<FOOTNOTE>
233233
<INDEX>conditional expression<SUBINDEX>non-boolean value as predicate</SUBINDEX></INDEX>
234-
Conditionals in full JavaScript accept any value, not just a boolean, as the result of evaluating
234+
Conditionals
235+
<LABEL NAME="foot:any-value-as-predicate"/>
236+
in full JavaScript accept any value, not just a boolean, as the result of evaluating
235237
the <META>predicate</META> expression (see footnote<SPACE/><REF NAME="foot:truthy"/>
236238
in section<SPACE/><REF NAME="sec:eval-data-structures"/> for details). The programs in this book
237239
use only boolean values as predicates of conditionals.
@@ -591,8 +593,10 @@ $\vdots$
591593
<INDEX>evaluation<SUBINDEX>of <JAVASCRIPTINLINE>&amp;&amp;</JAVASCRIPTINLINE><ORDER>of ;1</ORDER></SUBINDEX><FRAGILE/></INDEX>
592594
<EM>logical conjunction</EM>, meaning roughly
593595
the same as the English word <QUOTE>and.</QUOTE>
594-
This syntactic form is syntactic sugar<FOOTNOTE>
595-
Syntactic forms that are simply convenient
596+
We assume<FOOTNOTE>This assumption is justified by the restriction mentioned
597+
in footnote<SPACE/><REF NAME="foot:any-value-as-predicate"/>. Full JavaScript
598+
needs to consider the case where the result of evaluating <META>expression</META><LATEXINLINE>$_1$</LATEXINLINE> is neither true nor false.</FOOTNOTE> this syntactic form to be syntactic
599+
sugar<FOOTNOTE>Syntactic forms that are simply convenient
596600
alternative surface structures for things that can be written in more
597601
uniform ways are sometimes called <EM>syntactic sugar</EM>, to use a
598602
phrase coined by
@@ -617,7 +621,7 @@ $\vdots$
617621
<INDEX>evaluation<SUBINDEX>of {\tt "|"|}<ORDER>of ;2</ORDER></SUBINDEX><FRAGILE/></INDEX>
618622
<EM>logical disjunction</EM>, meaning roughly
619623
the same as the English word <QUOTE>or.</QUOTE>
620-
This syntactic form is syntactic sugar for<BR/>
624+
We assume this syntactic form to be syntactic sugar for<BR/>
621625
<META>expression</META><LATEXINLINE>$_1$</LATEXINLINE> <JAVASCRIPTINLINE>?</JAVASCRIPTINLINE>
622626
<JAVASCRIPTINLINE>true</JAVASCRIPTINLINE> <JAVASCRIPTINLINE>:</JAVASCRIPTINLINE>
623627
<META>expression</META><LATEXINLINE>$_2$</LATEXINLINE>.

0 commit comments

Comments
 (0)