回答編集履歴

2

未検証⇒検証済のコードに修正

2018/11/03 03:25

投稿

think49
think49

スコア18162

test CHANGED
@@ -1,10 +1,16 @@
1
- 未検証。
1
+ ~~未検証。~~
2
+
3
+ 検証済のコードに修正。
2
4
 
3
5
 
4
6
 
5
7
  ```JavaScript
6
8
 
7
- [[92, 90, 68, 86],[78, 100, 96, 80],[68, 45, 88, 75]].map(Function.prototype.apply.bind(Math.max));
9
+ const array = [[92, 90, 68, 86],[78, 100, 96, 80],[68, 45, 88, 75]];
10
+
11
+
12
+
13
+ console.log(array.map(Function.prototype.apply.bind(Math.max, null))); // [92, 100, 88]
8
14
 
9
15
  ```
10
16
 

1

Function.prototype.apply

2018/11/03 03:25

投稿

think49
think49

スコア18162

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```JavaScript
6
6
 
7
- [[92, 90, 68, 86],[78, 100, 96, 80],[68, 45, 88, 75]].map(Array.prototype.apply.bind(Math.max));
7
+ [[92, 90, 68, 86],[78, 100, 96, 80],[68, 45, 88, 75]].map(Function.prototype.apply.bind(Math.max));
8
8
 
9
9
  ```
10
10