+ 2
JavaScript Program Help (please)
https://code.sololearn.com/WDTlbE05SHXS/#js In line 3, console.log(id) returns 1, and an element with id 1 exists, but document.getElementById(id) is null. Can someone explain how to fix?
1 Resposta
+ 2
Put 1 in quotations. var id = "1";