+ 1

Error in sololearn during attaching javascript

When I attach js to html from my sololearn terminal it show error why. Here when i addEventListener ir show null value but there is value which ibwrite

11th Feb 2025, 4:34 AM
adarsh rajput9040
1 ответ
+ 4
wait for the html to load. the javascript tab runs before the html tab in the Sololearn Android app, so it will not be able to find your DOM elements because the html has not loaded yet. in your js tab, do this: onload = ()=>{ /* your js code here */ }
11th Feb 2025, 5:19 AM
Bob_Li
Bob_Li - avatar