回答編集履歴

1

let -> const

2020/05/18 17:36

投稿

satokei
satokei

スコア1217

test CHANGED
@@ -22,9 +22,9 @@
22
22
 
23
23
  list.addEventListener('click', e => {
24
24
 
25
- let nowIndex = iconList.findIndex(icon => e.target.classList.contains(icon));
25
+ const nowIndex = iconList.findIndex(icon => e.target.classList.contains(icon));
26
26
 
27
- let nextIndex = (nowIndex + 1) % iconList.length;
27
+ const nextIndex = (nowIndex + 1) % iconList.length;
28
28
 
29
29
  e.target.classList.replace(iconList[nowIndex], iconList[nextIndex]);
30
30