0

AddEventListener Problem!

AddEventListener Problem! How can I fix it? Please help me. https://code.sololearn.com/W2Qq2MY2Tp9B/?ref=app

26th Jun 2021, 4:45 PM
Nur EfƟan ƞimƟek
Nur EfƟan ƞimƟek - avatar
3 Answers
+ 3
Nur EfƟan ƞimƟek Function name should start from small character. Also write js code inside window.onload function window.onload = function () { document.querySelector('button') .addEventListener('click', () => { alert('Hello guys, how are you?') }) } https://code.sololearn.com/WMOPto3x77nE/?ref=app
26th Jun 2021, 4:50 PM
AÍąJ
AÍąJ - avatar
+ 2
26th Jun 2021, 4:50 PM
Ipang
+ 2
Thank you đŸ™đŸ»
26th Jun 2021, 4:53 PM
Nur EfƟan ƞimƟek
Nur EfƟan ƞimƟek - avatar