spin.classList.remove('inactive'); の先頭に this がつかないのはなぜですか?

関数ではなく定数 spin を参照しているためです。
2021年4月15日
ユーザー
this.stop.addEventListener('click', () => {
        if (this.stop.classList.contains('inactive')) {
          return;
        }
        this.stop.classList.add('inactive');

        clearTimeout(this.timeoutId);

        panelsLeft--;

        if (panelsLeft === 0) {
          checkResult();
          spin.classList.remove('inactive');
          panelsLeft = 3;
        }
      });

での、spin.classList.remove('inactive');の先頭にthisが付かないのはなぜですか?

spin() {
      this.img.src = this.getRandomImage();
      this.timeoutId = setTimeout(() => {
        this.spin();
      }, 50);
    }

一方、同じクラス内にあるspin()のなかではthis.spin();のように先頭になぜthisが付くのですか?

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

プレミアムプランとは?