0
Why the piece of code in line 26 isn't working
3 odpowiedzi
+ 1
I didnt see bug at line 26 when I opened, you probably changed something, but it was lot of other bugs:
I changed code so it works, you used variable redd what dont exist, you added event listener to it, i think you mean query(your buttons).
But than we have 2 onclick for same element, this is not good practice, so you can make function and call inside 1 listener, but code works so I didnt changed.
Elements will change position, when you click, it is because button dont have text and now it get on click, you can set default 0 value to button inside html, and you dont need time object at all, you can take this current value(first is 0 than 1...) and add 1 to it, make sure you convert string to number.
Every listener give you event object by default, you dont need to pass it yourself, you can access event.target to get clicked elem
https://developer.mozilla.org/en-US/docs/Web/API/Event/target
https://code.sololearn.com/WxrL8RG32VfC/?ref=app
+ 1
PanicS Thanks for helping 🙏
0
Suparna Das oh soory i totaly forgot about it