+ 1
Why the value of h1 not changing?
Run the code, in console it is giving random element name, but now click “Start game” btn, the element name which was in console is not showing in the h1 above the input field. See JS line 55 ~ 67. https://code.sololearn.com/WlF1pR0Y75gd/?ref=app
1 Respuesta
+ 1
Try :
window.onload = generateRandomElement
Line : 67
Or
Write all javascript codes inside window.onload =()=>{
//your code
}