Skip to content

Commit 4225cac

Browse files
committed
First draft of an async chapter
1 parent 68caf44 commit 4225cac

5 files changed

Lines changed: 775 additions & 85 deletions

File tree

04_data.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,16 @@ console.log(Object.keys({x: 0, y: 0, z: 2}));
359359
// → ["x", "y", "z"]
360360
```
361361

362+
You can use `Object.assign` to copy the properties from one object
363+
into another.
364+
365+
```
366+
let objectA = {a: 1, b: 2};
367+
Object.assign(objectA, {b: 3, c: 4});
368+
console.log(objectA);
369+
// → {a: 1, b: 3, c: 4}
370+
```
371+
362372
{{index array, collection}}
363373

364374
Arrays, then, are just a kind of object specialized for storing
@@ -1562,7 +1572,7 @@ compare properties only when _both_ arguments are objects. In all
15621572
other cases you can just immediately return the result of applying
15631573
`===`.
15641574

1565-
{{index "Object.keys method"}}
1575+
{{index "Object.keys function"}}
15661576

15671577
Use `Object.keys` to go over the properties. You need to test whether
15681578
both objects have the same set of property names and whether those

06_object.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,8 @@ hint}}
11051105

11061106
{{index "list (exercise)", interface, "iterator interface"}}
11071107

1108+
{{id list_iterator}}
1109+
11081110
Make the `List` class from the previous exercise iterable. Refer back
11091111
to the section about the iterator interface earlier in the chapter if
11101112
you aren't clear on the exact form of the interface anymore.

0 commit comments

Comments
 (0)