Uncaught TypeError: current.forEach is not a function
For further actions, you may consider blocking this person and/or reporting abuse
Uncaught TypeError: current.forEach is not a function
For further actions, you may consider blocking this person and/or reporting abuse
Mike Young -
Mike Young -
Kerry Owston -
Daniel Sogl -
Top comments (4)
It seems like you're trying to call the
forEach
function, that exists on arrays (developer.mozilla.org/de/docs/Web/...) on a non-array element (i.e.,current
doesn't appear to be an array, meaning you can't callforEach
on it).It would help if you could post the code to reproduce the problem, otherwise, this is about as much help as I'll be able to provide (since I don't have any more context: what is
current
? In what context are you trying to callforEach
on it, etc.).I hope this still helps 😉
I run into this problem.
Uncaught TypeError: Cannot read property 'classList' of undefined
at app.js:176
at Array.forEach ()
at displayShape (app.js:175)
at freeze (app.js:112)
at moveDown (app.js:100)
and
Uncaught TypeError: Cannot read property 'forEach' of undefined
at displayShape (app.js:175)
at freeze (app.js:112)
at moveDown (app.js:100)
`
document.addEventListener('DOMContentLoaded', () => {
// The Tetrominoes
})
`
it seems that
mini-grid
is class name and it's missing.
before class name in query selector.This
should be (notice
.
beforemini-grid
)Thanks, but I still get the same error