Treasure Hunter project Step 11: nested "for" loop not displaying 'blank' sprite properly

I’m working through the Treasure Hunter project and, up until step 11 (update sprite from ‘gold’ to ‘blank’) the script seems to work just fine. My specific problem is this: it is indicated in the instructions that if the code is correct the game board should display those even green squares instead of the gold coins.

in my case, this is what is being displayed:

The top row of gold coins created by the initial loop (step 7) is still displaying ‘behind’ those blackish squares. Additionally, those blackish squares do not match the even green square provided in the instructions.

The code for the loop is as follows:

     // Create the for loops to create the grid
      for (let x = 46; x < 437; x += 78){
        this.add.sprite(x, 46, 'gold');
for (let y = 46; y < 437; y += 78){
  plot = this.add.sprite(x, y, 'blank');
  grid.push(plot)
}
      }

I may have not done step 10 correctly as well, and if anything is with the syntax for grid.push(plot) I could use a little clarification on that as well.

I hope that this is clear enough, and if you need any more information, please let me know.

You should test your code around the areas where the conditions are not working. If you write tracer statements (like: console.log(someCondition === true);) you should be able to at least isolate the area in your code with the problem. Remember you can interact with the console in real time and tinker that way.

If you still can’t work with it then I’d come back and post your code (formatting it with the button </>)

It’s always great to set up your work environment locally. I almost never did anything I could do locally on CC, I would always just copy and paste the answer afterwards. It gives a better feel for normal workflow on independent projects. Obviously some projects are impossible to make that happen in cc, but a lot of them you can get the helper file code and transport it to your local system.

I use VS code to do html and css stuff locally, however I’ve had problems linking the js files and getting them to work properly in my local environment. Another problem for another day; I’m just trying to get the essential concepts of javascript down pat, for now.