en.javascript.info/2-ui/2-events/01-introduction-browser-events/03-which-handlers-run/task.md
Ilya Kantor ab9ab64bd5 up
2017-03-21 14:41:49 +03:00

17 lines
348 B
Markdown

importance: 5
---
# Which handlers run?
There's a button in the variable. There are no handlers on it.
Which handlers run on click after the following code? Which alerts show up?
```js no-beautify
button.addEventListener("click", () => alert("1"));
button.removeEventListener("click", () => alert("1"));
button.onclick = () => alert(2);
```