Closed smsgoldberg closed 1 year ago
Is the push
is not defined message happening on the very first line where you try to push into your new array or later on? Also you have a comma on the second to last imageArray you are trying to push into
I totally missed the comma! It's not throwing that error anymore.
What's the problem you're trying to solve?
I'm trying to push objects I created into an empty array so I can use them to populate the board, but I keep getting a "push is not defined" error. The array in question is defined at the top of my code.
Post any code you think might be relevant (one fenced block per file)
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
main.js:87 Uncaught ReferenceError: push is not defined at main.js:87:12
What is your best guess as to the source of the problem?
I'm genuinely not sure it the problem here is logical or syntactical in nature -- which makes me suspect it's a combination of the two.
What things have you already tried to solve the problem?
I've tried putting the color names -- included only for my own testing purposes -- in single quotes. Otherwise I'm quite flummoxed and have been for quite a while.
Paste a link to your repository here
https://github.com/smsgoldberg/StayGolden