質問編集履歴

4

文法の修正

2020/03/17 15:54

投稿

kwiyy
kwiyy

スコア12

test CHANGED
File without changes
test CHANGED
@@ -44,9 +44,9 @@
44
44
 
45
45
  //コンソールに表示される結果
46
46
 
47
- {name:"Taro",age:24}
47
+ //{name:"Taro",age:24}
48
48
 
49
- {name:"Takeshi",age:24}
49
+ //{name:"Takeshi",age:24}
50
50
 
51
51
  ```
52
52
 
@@ -82,9 +82,9 @@
82
82
 
83
83
  //コンソールに表示される結果
84
84
 
85
- {name:"Taro",age:24}
85
+ //{name:"Taro",age:24}
86
86
 
87
- {name:"Takeshi",age:24}
87
+ //{name:"Takeshi",age:24}
88
88
 
89
89
 
90
90
 

3

文法の修正

2020/03/17 15:54

投稿

kwiyy
kwiyy

スコア12

test CHANGED
File without changes
test CHANGED
@@ -20,9 +20,9 @@
20
20
 
21
21
  const members = [
22
22
 
23
- {name:"Taro",age:24}
23
+ {name:"Taro",age:24},
24
24
 
25
- {name:"Goro",age:25}
25
+ {name:"Goro",age:25},
26
26
 
27
27
  {name:"Takeshi",age:24}
28
28
 
@@ -30,19 +30,19 @@
30
30
 
31
31
 
32
32
 
33
- for(i=0; i >== members.length; i++){
33
+ for(let i=0; i < members.length; i++){
34
34
 
35
35
  if(members[i].age === 24){
36
36
 
37
37
  console.log(members[i]);
38
38
 
39
- }
39
+ }
40
40
 
41
41
  }
42
42
 
43
43
 
44
44
 
45
- //表示される結果
45
+ //コンソールに表示される結果
46
46
 
47
47
  {name:"Taro",age:24}
48
48
 
@@ -54,19 +54,15 @@
54
54
 
55
55
  ```JavasCript
56
56
 
57
+ const members = [
57
58
 
59
+ {name:"Taro",age:24},
58
60
 
59
- const members ={
60
-
61
- {name:"Taro",age:24}
62
-
63
- {name:"Goro",age:25}
61
+ {name:"Goro",age:25},
64
62
 
65
63
  {name:"Takeshi",age:24}
66
64
 
67
- };
65
+ ];
68
-
69
-
70
66
 
71
67
  const filterMembers = members.filter((member)=>{
72
68
 
@@ -84,7 +80,7 @@
84
80
 
85
81
 
86
82
 
87
- //表示される結果
83
+ //コンソールに表示される結果
88
84
 
89
85
  {name:"Taro",age:24}
90
86
 

2

filterMembers の綴りが間違えていました

2020/03/17 15:49

投稿

kwiyy
kwiyy

スコア12

test CHANGED
File without changes
test CHANGED
@@ -68,7 +68,7 @@
68
68
 
69
69
 
70
70
 
71
- const fileterMembers = members.filter((member)=>{
71
+ const filterMembers = members.filter((member)=>{
72
72
 
73
73
 
74
74
 

1

変数定義を間違えていました。

2020/03/17 14:44

投稿

kwiyy
kwiyy

スコア12

test CHANGED
File without changes
test CHANGED
@@ -56,7 +56,7 @@
56
56
 
57
57
 
58
58
 
59
- const = members ={
59
+ const members ={
60
60
 
61
61
  {name:"Taro",age:24}
62
62