0
Why is currentPiece not defined?
Line 139-140 https://code.sololearn.com/WIGYx83rvJhh/?ref=app Edit: I used a variable in the argument for getElementById in line 52 also and it worked. I want to do the same here. It doesn’t work because logging it to the console returns null.
2 odpowiedzi
0
Looks like you got it to work?
0
You are supposed to wrap it in quotation marks
………
document.getElementById("current PieceID");
………
Happy Coding 💗