+ 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

23rd Dec 2021, 3:53 PM
Parth
Parth - avatar
1 Resposta
+ 1
Try : window.onload = generateRandomElement Line : 67 Or Write all javascript codes inside window.onload =()=>{ //your code }
23rd Dec 2021, 4:01 PM
Pariket Thakur
Pariket Thakur - avatar