質問編集履歴
1
変数名修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
|
30
30
|
|
31
|
-
var
|
31
|
+
var arr = [
|
32
32
|
|
33
33
|
{ grade: 'A', name: 'いいA' },
|
34
34
|
|
@@ -56,7 +56,7 @@
|
|
56
56
|
|
57
57
|
|
58
58
|
|
59
|
-
var
|
59
|
+
var arr = [
|
60
60
|
|
61
61
|
{ grade: 'S', name: 'ああS' },
|
62
62
|
|
@@ -80,7 +80,7 @@
|
|
80
80
|
|
81
81
|
```JavaScript
|
82
82
|
|
83
|
-
r
|
83
|
+
arr.sort(function(a, b) {
|
84
84
|
|
85
85
|
if (a.name > b.name) {
|
86
86
|
|
@@ -100,7 +100,7 @@
|
|
100
100
|
|
101
101
|
|
102
102
|
|
103
|
-
r
|
103
|
+
arr.sort(function(a, b){
|
104
104
|
|
105
105
|
if (a.grade === 'S') return -1;
|
106
106
|
|