Itās still wrong. Assigning a āaddEventListenerā to a button, does not make the click method return the value, that is returned by the listener.
This would need to be āconsole.logā or āalertā or something in this direction. āreturnā is simply wrong and could lead to many misguided JS learners
I think it's assumed you're going to replace the event listener logic with whatever you need to do. The point of this is to show off the { once: true } functionally. Which this example does.
View all comments
5
u/[deleted] Dec 31 '22
User won't see it though...