Skip to content

Commit 8a2ce39

Browse files
committed
Various small fixes
Closes marijnh#299 Closes marijnh#293 Closes marijnh#294
1 parent 2cc376b commit 8a2ce39

5 files changed

Lines changed: 14 additions & 13 deletions

File tree

01_values.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ So that's the binary number 00001101, or 8 + 4 + 1, or 13.
4646
{{index memory, "volatile data storage", "hard drive"}}
4747

4848
Imagine a sea of bits. An ocean of them. A typical modern computer has
49-
more than 30 billion bits in its volatile data storage. Nonvolatile
50-
storage (the hard disk or equivalent) tends to have yet a few orders
51-
of magnitude more.
49+
more than 30 billion bits in its volatile data storage (working
50+
memory). Nonvolatile storage (the hard disk or equivalent) tends to
51+
have yet a few orders of magnitude more.
5252

5353
To be able to work with such quantities of bits without getting lost,
5454
we must separate them into chunks that represent pieces of

03_functions.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,12 +425,13 @@ console.log(chicken() + " came first.");
425425
The following code is allowed and executes without any problem:
426426

427427
```
428+
function square(x) { return x * x; }
428429
console.log(square(4, true, "hedgehog"));
429430
// → 16
430431
```
431432

432-
We defined `square` with only one ((parameter)). Yet when you call it
433-
like this, it doesn't complain. It ignores the extra arguments and
433+
We define `square` with only one ((parameter)). Yet when you call it
434+
with three, it doesn't complain. It ignores the extra arguments and
434435
computes the square of the first one.
435436

436437
{{index undefined}}

08_error.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -596,9 +596,9 @@ function transfer(from, amount) {
596596
}
597597
```
598598

599-
This version of the function tracks it progress, and if, when leaving,
600-
it notices that it was aborted at a point where it had created an
601-
inconsistent program state, it repairs the damage it did.
599+
This version of the function tracks its progress, and if, when
600+
leaving, it notices that it was aborted at a point where it had
601+
created an inconsistent program state, it repairs the damage it did.
602602

603603
Note that, even though the `finally` code is run when an exception
604604
leaves the `try` block, it does not interfere with the exception.

11_async.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ defineRequestType("note", (nest, content, source, done) => {
248248
The `defineRequestType` function defines a new type of request. The
249249
example adds support for `"note"` requests, which just send a note to
250250
a given nest. Our implementation just calls `console.log` so that we
251-
can verify that the request arrived. The `name` binding holds the name
252-
of this nest.
251+
can verify that the request arrived. The `name` property holds the
252+
name of the nest.
253253

254254
{{index "asynchronous programming"}}
255255

20_node.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,10 @@ $ node
262262
After running `npm install`, ((NPM)) will have created a directory
263263
called `node_modules`. Inside that directory will be an `ini`
264264
directory, which contains the ((library)). When we run `node` and call
265-
`require("figlet")`, this library is loaded, and we can call its
266-
`text` method to draw some big letters.
265+
`require("ini")`, this library is loaded, and we can call its `parse`
266+
property to parse a configuration file.
267267

268-
By default NPM installs packages into the current directory, rather
268+
By default NPM installs packages under the current directory, rather
269269
than in a central place. If you are used to other package managers,
270270
this may seem unusual, but it has advantages—it puts each application
271271
in full control of the packages it installs, and makes it easier to

0 commit comments

Comments
 (0)