回答編集履歴
1
chousei
test
CHANGED
@@ -1 +1,11 @@
|
|
1
1
|
めんどうならsplitしちゃうとか
|
2
|
+
|
3
|
+
```javascript
|
4
|
+
|
5
|
+
var str = "testest-";
|
6
|
+
|
7
|
+
var underCount = str.split(/_/).length-1;
|
8
|
+
|
9
|
+
console.log(underCount);
|
10
|
+
|
11
|
+
```
|