回答編集履歴

1

調整

2020/06/22 11:08

投稿

yambejp
yambejp

スコア116724

test CHANGED
@@ -1,17 +1,15 @@
1
1
  ```javascript
2
2
 
3
- deleteButton.addEventListener('click', (e) => {
3
+ deleteButton.addEventListener('click', (e) => {
4
4
 
5
- var t=e.target.closest('tr');
5
+ var t=e.target.closest('tr');
6
6
 
7
- var idx=[...tableBody.querySelectorAll('tr')].indexOf(t);
7
+ var idx=[...tableBody.querySelectorAll('tr')].indexOf(t);
8
8
 
9
- t.parentNode.removeChild(t);
9
+ t.parentNode.removeChild(t);
10
10
 
11
- todos.splice(idx,1);
11
+ todos.splice(idx,1);
12
12
 
13
- console.log(todos);
14
-
15
- });
13
+ });
16
14
 
17
15
  ```