回答編集履歴
1
調整
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
const b=a.map((x,y,z)=>x==Math.max(...z)?"rand"+(y+1):null).filter(x=>x!==null);
|
6
6
|
|
7
|
-
return (a.length==b.length)?"
|
7
|
+
return (a.length==b.length)?(a.length+"個のデータは同じ値です"):("一番値が大きいのは"+b.join("と")+"です");
|
8
8
|
|
9
9
|
}
|
10
10
|
|
@@ -14,4 +14,10 @@
|
|
14
14
|
|
15
15
|
console.log(check([0,2,2]));
|
16
16
|
|
17
|
+
console.log(check([1,1,0,1,1]));
|
18
|
+
|
19
|
+
console.log(check([1,1,1,1,1]));
|
20
|
+
|
21
|
+
|
22
|
+
|
17
23
|
```
|