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
https://jsfiddle.net/53hbw8mu/1/
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.
document.querySelector(".answers").onclick = e => { worked in the end
document.querySelector(".answers").onclick = e => {
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
https://gotsocial.co.uk/colours/index.php#game