質問編集履歴

1

更新

2020/12/19 10:51

投稿

moto12
moto12

スコア15

test CHANGED
File without changes
test CHANGED
@@ -78,15 +78,15 @@
78
78
 
79
79
  const members = document.querySelectorAll('.members');
80
80
 
81
- for(let i = 0; i < members.length; i++) {
81
+ for(const member of members) {) {
82
82
 
83
- if (members[i].getAttribute('style') == 'display:block;') {
83
+ if (member.getAttribute('style') == 'display:block;') {
84
84
 
85
- members[i].removeAttribute('style','display:block;')
85
+ member.removeAttribute('style','display:block;')
86
86
 
87
87
  } else {
88
88
 
89
- members[i].setAttribute('style','display:block;')
89
+ member.setAttribute('style','display:block;')
90
90
 
91
91
  }
92
92