回答編集履歴

1

fix

2017/08/11 14:22

投稿

mattn
mattn

スコア5030

test CHANGED
@@ -75,3 +75,67 @@
75
75
  </html>
76
76
 
77
77
  ```
78
+
79
+ なお、一つ前の if 文で `a < 30` をチェックしているので、省略して
80
+
81
+
82
+
83
+ ```html
84
+
85
+ <!DOCTYPE html>
86
+
87
+ <html lang="ja">
88
+
89
+ <head>
90
+
91
+ <meta charset="UTF-8">
92
+
93
+ <title>タイトル</title>
94
+
95
+ </head>
96
+
97
+ <body>
98
+
99
+ <script>
100
+
101
+ (function () {
102
+
103
+ 'use strict';
104
+
105
+
106
+
107
+ var a = 70;
108
+
109
+
110
+
111
+ var result = null;
112
+
113
+ if (a < 30) {
114
+
115
+ result = '補修';
116
+
117
+ } else if (a < 80) {
118
+
119
+ result = '合格';
120
+
121
+ } else {
122
+
123
+ result = '優';
124
+
125
+ }
126
+
127
+
128
+
129
+ document.write(result);
130
+
131
+ })();
132
+
133
+ </script>
134
+
135
+ </body>
136
+
137
+ </html>
138
+
139
+ ```
140
+
141
+ と書けます。