回答編集履歴

1

再調整

2019/04/19 08:51

投稿

yambejp
yambejp

スコア114883

test CHANGED
@@ -7,6 +7,8 @@
7
7
  'use strict'
8
8
 
9
9
  window.addEventListener('DOMContentLoaded',()=>{
10
+
11
+ const Average=score=>score.reduce((x,y)=>parseInt(x)+parseInt(y))/score.length;
10
12
 
11
13
  const score=["65", "70", "85", "90", "50", "62", "76", "88", "64", "45"];
12
14
 
@@ -30,12 +32,6 @@
30
32
 
31
33
  display.appendChild(ul);
32
34
 
33
- function Average(score){
34
-
35
- return score.reduce((x,y)=>parseInt(x)+parseInt(y))/score.length;
36
-
37
- }
38
-
39
35
  console.log("The average score is:" + Average(score));
40
36
 
41
37
  });