Skip to content

Commit 7a1e623

Browse files
committed
Fix mismatched function name between code and text in Chapter 8
1 parent 58384cc commit 7a1e623

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

08_error.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,10 @@ to report to the user what went wrong and then give up. But in either
371371
situation, the program has to actively do something in response to the
372372
problem.
373373

374-
{{index "promptInteger function", validation}}
374+
{{index "promptNumber function", validation}}
375375

376-
Say you have a function `promptInteger` that asks the user for a whole
377-
number and returns it. What should it return if the user inputs
378-
"orange"?
376+
Say you have a function `promptNumber` that asks the user for a number
377+
and returns it. What should it return if the user inputs "orange"?
379378

380379
{{index null, undefined, "return value", "special return value"}}
381380

html/errata.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ <h2>Chapter 6</h2>
3636
paragraph below the example code, instead of “<code>content</code>
3737
method”, the text should say “<code>element</code> function”.
3838

39+
<h2>Chapter 8</h2>
40+
41+
<p><strong>Page 134</strong> <em>Error Propagation</em>: In the third
42+
paragraph of the section, a function <code>promptInteger</code> is
43+
referred to. The function is actually
44+
called <code>promptNumber</code>, and the word “whole” should be
45+
dropped from the sentence (it accepts non-whole numbers, too).</p>
46+
3947
<h2>Chapter 10</h2>
4048

4149
<p><strong>Page 168</strong> (1st) <em>Modules as Building Blocks</em>: In “each

0 commit comments

Comments
 (0)