Currently, I'm trying to detect each element based on forEach button. I'm not sure I'm going in the right direction with it
forEach click
NogDog added the ClientSide Technologies tag.
4 days later
- Edited
JavaScript and PHP use the same operator(s) for comparison ... more or less. You're using "=" instead of "==" to check the value of el.TextContent
This is causing the buttons text to change after the 1st click, also.
- Edited
document.querySelector(".answers").onclick = e => {
worked in the end
For a little game I'm making, need to fix some styles and add a restart button but this is the idea of it for my junior portfolio