質問編集履歴
5
取り消し
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
この質問は削除されました
|
1
|
+
この質問は削除されました
|
body
CHANGED
File without changes
|
4
取り消し
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
この質問は削除されました
|
1
|
+
この質問は削除されました ーーーーー
|
body
CHANGED
File without changes
|
3
取り消し
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
この質問は削除されました この質問は削除されました
|
body
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
この質問は削除されましたこの質問は削除されましたこの質問は削除されましたこの質問は削除されましたこの質問は削除されました
|
2
取り消し
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
間違えました他aaaaaaaaaaaaaaaa
|
body
CHANGED
@@ -1,33 +1,1 @@
|
|
1
|
-
例えば下記のようなswich文は、どのようにfor文にするのでしょうか
|
2
|
-
(ボタンを押す度に処理の内容が変わる処理です)
|
3
|
-
|
4
|
-
```JavaScript
|
5
|
-
<body>
|
6
|
-
|
1
|
+
ああああああああああああああああああああああああああああああああああああああああああああaaaaaaaa
|
7
|
-
|
8
|
-
<script>
|
9
|
-
let button = document.getElementById("button");
|
10
|
-
let cnt = 0;
|
11
|
-
|
12
|
-
button.addEventListener('click', () => {
|
13
|
-
cnt++;
|
14
|
-
|
15
|
-
switch(3 - cnt){
|
16
|
-
case 2: console.log("aaa");
|
17
|
-
break;
|
18
|
-
case 1: console.log("bbb");
|
19
|
-
break;
|
20
|
-
case 0: console.log("ccc");
|
21
|
-
|
22
|
-
cnt = 0;
|
23
|
-
break;
|
24
|
-
}
|
25
|
-
});
|
26
|
-
|
27
|
-
</script>
|
28
|
-
</body>
|
29
|
-
|
30
|
-
```
|
31
|
-
|
32
|
-
|
33
|
-
|
1
コード挿入タグ
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,29 +1,33 @@
|
|
1
|
-
例えば下記のようなswich文は、どのようにfor文にするのでしょうか
|
1
|
+
例えば下記のようなswich文は、どのようにfor文にするのでしょうか
|
2
|
-
(ボタンを押す度に処理の内容が変わる処理です)
|
2
|
+
(ボタンを押す度に処理の内容が変わる処理です)
|
3
|
-
|
3
|
+
|
4
|
-
JavaScript
|
4
|
+
```JavaScript
|
5
|
-
|
6
|
-
<body>
|
5
|
+
<body>
|
7
|
-
<button id="button">あああ</button>
|
6
|
+
<button id="button">あああ</button>
|
8
|
-
|
7
|
+
|
9
|
-
<script>
|
8
|
+
<script>
|
10
|
-
let button = document.getElementById("button");
|
9
|
+
let button = document.getElementById("button");
|
11
|
-
let cnt = 0;
|
10
|
+
let cnt = 0;
|
12
|
-
|
11
|
+
|
13
|
-
button.addEventListener('click', () => {
|
12
|
+
button.addEventListener('click', () => {
|
14
|
-
cnt++;
|
13
|
+
cnt++;
|
15
|
-
|
14
|
+
|
16
|
-
switch(3 - cnt){
|
15
|
+
switch(3 - cnt){
|
17
|
-
case 2: console.log("aaa");
|
16
|
+
case 2: console.log("aaa");
|
18
|
-
break;
|
17
|
+
break;
|
19
|
-
case 1: console.log("bbb");
|
18
|
+
case 1: console.log("bbb");
|
20
|
-
break;
|
19
|
+
break;
|
21
|
-
case 0: console.log("ccc");
|
20
|
+
case 0: console.log("ccc");
|
22
|
-
|
21
|
+
|
23
|
-
cnt = 0;
|
22
|
+
cnt = 0;
|
24
|
-
break;
|
23
|
+
break;
|
25
|
-
}
|
24
|
+
}
|
26
|
-
});
|
25
|
+
});
|
27
|
-
|
26
|
+
|
28
|
-
</script>
|
27
|
+
</script>
|
29
|
-
</body>
|
28
|
+
</body>
|
29
|
+
|
30
|
+
```
|
31
|
+
|
32
|
+
|
33
|
+
|