回答編集履歴
1
1
answer
CHANGED
@@ -3,4 +3,11 @@
|
|
3
3
|
if (category in {A:0,B:0}) {
|
4
4
|
console.log("HIT!")
|
5
5
|
}
|
6
|
+
```
|
7
|
+
--- 追記 ---
|
8
|
+
文字列でもいけるみたいスね
|
9
|
+
```javascript
|
10
|
+
if ('AB'.includes(category)) {
|
11
|
+
console.log("HIT!")
|
12
|
+
}
|
6
13
|
```
|