0
JavaScript code is being executed before the HTML completes loading.
Whenever you code in sololearn, put your js code inside this block below.
window.onload = function() {
// Your code
}
In general, you should link your js file just before closing body tag.
0
Learn to read error messages.
Btw you wrote unload instead of onload.