+ 1

why erorr

I'm learning the object and when I try it why is there any erorr who can help me? https://code.sololearn.com/W3qJFeYLu5Al/?ref=app

29th Apr 2018, 7:06 AM
Hafizd Jubaidir
Hafizd Jubaidir - avatar
3 Respostas
+ 2
sololearn requires window.onload https://code.sololearn.com/WVs08J9nVC6a/?ref=app
29th Apr 2018, 7:22 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 1
onload tells it to wait until the window is finished loading completely. You don't want your code to execute before the elements it is trying to reference are rendered. So you put it in an onload listener. It is an event handler like onclick.
29th Apr 2018, 9:42 AM
Adam
Adam - avatar
0
brains what is the use of onload please explain to me
29th Apr 2018, 7:26 AM
Hafizd Jubaidir
Hafizd Jubaidir - avatar