li の代わりに e.target を使って書いてみたのですが、上手くいきません

詳しく解説いたします。
2022年3月5日
ユーザー

正誤判定の際に li の代わりに e.target を指定してもうまくいくかなと思ったのですができませんでした。

function checkAnswer(li) {
    if (li.textContent === quizSet[currentNum].c[0]) {
      console.log('correct');
    } else {
      console.log('wrong');
    }
  }

  function setQuiz() {
    question.textContent = quizSet[currentNum].q;

    const shuffledChoices = shuffle([...quizSet[currentNum].c]);
    shuffledChoices.forEach(choice => {
      const li = document.createElement('li');
      li.textContent = choice;
      li.addEventListener('click', () => {
        checkAnswer(li);
      });
      choices.appendChild(li);
    });
  }

上記のコードを下記のように変更してみました。

function checkAnswer(e) {
    if (e.target === quizSet[currentNum].c[0]) {
      console.log('correct');
    } else {
      console.log('wrong');
    }
  }

  function setQuiz() {
    question.textContent = quizSet[currentNum].q;

    const shuffledChoices = shuffle([...quizSet[currentNum].c]);
    shuffledChoices.forEach(choice => {
      const li = document.createElement('li');
      li.textContent = choice;
      li.addEventListener('click', (e) => {
        checkAnswer(e);
      });
      choices.appendChild(li);
    });
  }

すると、すべての回答で wrong が返ってきてしまいました。
console.logで lie.target それぞれの中身を見てみましたが、中身は同じようだったので、なぜ e.target だとうまく機能しないのかわかりません。
e.target を理解できるように練習したいので、この場合だとなぜダメだったのかご教授お願い致します。
それともやり方が間違っているだけで e.target を使用することも可能なのでしょうか。

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

プレミアムプランとは?