0
How to fix this guys
2 odpowiedzi
+ 5
Modify line 1 in JS to:
onload=()=>{
document.getElementById('solve').addEventListener("click", function(){
at last line put } at end
explanation:
1. why use "document.getElementById('solve')"?
if you just use solve without explicitly referencing it through document.getElementById(), the code will look for a global variable named "solve".
2. Why use "onload=()=>{...}"?
The onload event is used to ensure that all of the resources required by a web page are loaded and ready before executing any JavaScript code.
+ 3
Thx it's really helpful