Day 25 — options in eventListener, anonymous function

What I learned from JavaScript 30(Course Web —

Coding on Github

Actually I don’t much know what this class is talking about, but I think the things here will be helpful to fix some bugs that come from even listener.

Options: capture, once, passive

En-MDN: some options in eventListener

Ch-article: capture, bubbling in event

anonymous function

If want to pass parameters in evenListener function, should use anonymous function.

document.getElementById(“myBtn”).addEventListener(“click”, function() {
 myFunction(p1, p2);