回答編集履歴
1
thenの連結について補足
test
CHANGED
@@ -42,8 +42,22 @@
|
|
42
42
|
|
43
43
|
```js
|
44
44
|
|
45
|
+
/*
|
46
|
+
|
47
|
+
result = [
|
48
|
+
|
49
|
+
{id: 1, name: 'Alice'},
|
50
|
+
|
51
|
+
{id: 2, name: 'Bob'},
|
52
|
+
|
53
|
+
{id: 3, name: 'Charlie'}
|
54
|
+
|
55
|
+
]; の場合
|
56
|
+
|
57
|
+
*/
|
58
|
+
|
45
59
|
.then(result => result.map(name => name.id))
|
46
60
|
|
47
|
-
.then(ids =>
|
61
|
+
.then(ids => { console.log(ids); }) // [1, 2, 3]
|
48
62
|
|
49
63
|
```
|