0
Y the Results is null ?
Js in line 19 https://code.sololearn.com/WR2r089qdmew/?ref=app
2 Respuestas
+ 1
onload=()=>{
var myarray = new Array (1);
myarray[0] = document.getElementById('gg').innerHTML;
console.log(myarray[0]);
}
0
because the element havent loaded when the script is running.
try to wrap them as listerner to body onload, so the script will run after every element inside <body> are loaded