Fixed a wrong statement at line 120 of scripts.js .

grid[randCell] = value; --> grid[randCell].value = value;