質問するログイン新規登録

回答編集履歴

3

テキスト追加

2020/04/09 23:03

投稿

jun68ykt
jun68ykt

スコア9058

answer CHANGED
@@ -11,7 +11,7 @@
11
11
  return {
12
12
  name: this.find('td:nth-of-type(2)').text(),
13
13
  score: +this.find('td:nth-of-type(3)').text()
14
- }
14
+ };
15
15
  }
16
16
 
17
17
  // 集計用オブジェクト

2

テキスト追加

2020/04/09 23:03

投稿

jun68ykt
jun68ykt

スコア9058

answer CHANGED
@@ -9,8 +9,8 @@
9
9
  // データ行から、名前と点数を返すプラグインを作っておく
10
10
  $.fn.getData = function() {
11
11
  return {
12
+ name: this.find('td:nth-of-type(2)').text(),
12
- score: +this.find('td:nth-of-type(3)').text(),
13
+ score: +this.find('td:nth-of-type(3)').text()
13
- name: this.find('td:nth-of-type(2)').text()
14
14
  }
15
15
  }
16
16
 

1

テキスト追加

2020/04/09 10:04

投稿

jun68ykt
jun68ykt

スコア9058

answer CHANGED
@@ -35,8 +35,7 @@
35
35
  result.count ++;
36
36
  if (score > result.highest.score) {
37
37
  result.highest = { name, score };
38
- }
39
- if (score < result.lowest.score) {
38
+ } else if (score < result.lowest.score) {
40
39
  result.lowest = { name, score };
41
40
  }
42
41
  });