I’m trying to create a wack-A-Mole game but im having issues.
First off, my z index property is not working as the “moles” are supposed to be behind the “dirt”.
Also, i cant even properly select the moles, i keep getting the error “is not a function” even though the syntax looks fine.
I would really appreciate some help. Thank you.
You need both dirt and moles be in the same container to be able to use
getElementsByClassNames returns array-like data structure. Use
Here’s a fixed version: