@krykck You have a few problems:
You attempting to add event listeners before the grid has been created (i.e. you call the makeRows function after you have tried to add the event listeners).
The following code is not selecting any elements. Research how to use querySelectorAll.
var = squares=document.getElementById("container").getElementsByClassName(".grid-item");
- In the following line, i will reference an element that does not exist. You can either research how to make use of the event object that gets passed to the event listener or think about how you could use this here.
You can add a console.log(i) before the above line, to see what i’s value is.