Element.classList property not working

I am working through a Sudoku app tutorial and when I wrote out my loops within my function the ‘.classList’ property seems to work on my first loop to print the 1-9 to fill the empty tiles but on my rows and columns VS autofilled it and is not loading as a DOM manipulation. So when I load my localhost none of my tiles populate.

even the color of my first .classList and the second .classList is different in my VS.

Or maybe I just missed something completely and Im not sure what I looked over. If you have time please take a look.


function setGame() {
//digits 1-9
for (let i = 1; i <= 9; i++) {
// using DOM to create


let number = document.createElement(“div”);
number.id = i;
number.innerText = i;

for (let r = 0; r < 9; r++) {
for (let c = 0; c < 9; c++) {
let tile = document.creatElement(“div”);
tile.id = r.toString() + “-” + c.toString();