при вызове функции startGame код выполняется только один раз и выбивает ошибку Uncaught ReferenceError: red is not defined at :1:1

const gameArea = document.getElementsByClassName('main-table')[0];
const gameFields = document.getElementsByTagName('td');

function getRandomNumber() {
   return Math.round(Math.random() * (99 - 0) + 0);
}


function startGame() {
   setInterval(gameFields[getRandomNumber()].style.backgroundColor = 'red', 1500)

}

Ответы (0 шт):