Skip to content

Commit b289a90

Browse files
committed
Miscellaneous small fixes spotted by readers
Issue marijnh#260 Issue marijnh#258 Issue marijnh#256 Issue marijnh#254
1 parent 71c2537 commit b289a90

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

04_data.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,11 +1218,11 @@ like a good approach.
12181218

12191219
{{index serialization, "World Wide Web"}}
12201220

1221-
What we can do _serialize_ the data. That means it is converted into a
1222-
flat description. A popular format is called _((JSON))_ (pronounced
1223-
“Jason”), which stands for JavaScript Object Notation. It is widely
1224-
used as a data storage and communication format on the Web, even in
1225-
languages other than JavaScript.
1221+
What we can do is _serialize_ the data. That means it is converted
1222+
into a flat description. A popular format is called _((JSON))_
1223+
(pronounced “Jason”), which stands for JavaScript Object Notation. It
1224+
is widely used as a data storage and communication format on the Web,
1225+
even in languages other than JavaScript.
12261226

12271227
{{index array, object, [quoting, "in JSON"], comment}}
12281228

07_robot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function buildGraph(edges) {
7373
const roadGraph = buildGraph(roads);
7474
```
7575

76-
Given a an array of edges, `buildGraph` creates a map object that, for
76+
Given an array of edges, `buildGraph` creates a map object that, for
7777
each node, stores an array of connected nodes.
7878

7979
{{index "split method"}}

20_node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ and the request object that was returned from `http.request`.
607607
Writable streams are a widely used concept in Node. Such objects have
608608
a `write` method, which can be passed a string or a `Buffer` object,
609609
to write something to the stream. Their `end` method also optionally
610-
takes a value two write to the stream, and will close the steam after
610+
takes a value to write to the stream, and will close the steam after
611611
writing—or right away if none is given. Both of these methods can also
612612
be given a callback as an additional argument, which they will call
613613
when the writing to or closing of the stream has finished.

code/solutions/03_3_bean_counting.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function countChar(string, ch) {
2-
var counted = 0;
3-
for (var i = 0; i < string.length; i++) {
2+
let counted = 0;
3+
for (let i = 0; i < string.length; i++) {
44
if (string[i] == ch) {
55
counted += 1;
66
}

code/solutions/04_3_a_list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function listToArray(list) {
1515
}
1616

1717
function prepend(value, list) {
18-
return {value, rest};
18+
return {value, rest: list};
1919
}
2020

2121
function nth(list, n) {

0 commit comments

Comments
 (0)