2020年4月3日解決済み

「currentIndex++」と書いてはだめですか?

ユーザー
next.addEventListener('click', () => {
    let target = currentIndex+1;
    if(target === images.length){
      target = 0;
    }
    document.querySelectorAll('.thumbnails > li')[target].click();

  });

ここのcurrentIndex+1に関して、currentIndex++;という表記は間違いでしょうか。

スタッフ

この回答を見るにはプレミアムプランへの登録が必要です

プレミアムプランとは?