This isn’t a troubleshooting question with the tests. I completed the project just now.
I’m just wondering why document.addEventListener() is accepted and not window.addEventListener().
Wouldn’t they both work for this project?
This isn’t a troubleshooting question with the tests. I completed the project just now.
I’m just wondering why document.addEventListener() is accepted and not window.addEventListener().
Wouldn’t they both work for this project?
it depends on how it is tested, and what the event listener is listening for
if you want a more detailed answer you should share the two versions of your code and a link to the challenge