# JS Quiz: Easy: Simplest DOM event listener

**URL:** <https://forum.kirupa.com/t/js-quiz-easy-simplest-dom-event-listener/683700>\
**Category:** web dev\
**Created:** [October 13, 2026, 7:00am UTC](https://forum.kirupa.com/t/js-quiz-easy-simplest-dom-event-listener/683700 "2026-10-13T07:00:09Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Yoshiii](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/yoshiii/32/31156_2.png) [@Yoshiii](https://forum.kirupa.com/u/Yoshiii)\
**Post date:** [October 14, 2026, 8:00am UTC](https://forum.kirupa.com/t/js-quiz-easy-simplest-dom-event-listener/683700/3 "2026-10-14T08:00:05Z")

</div>

**JS Quiz answer:** Option 2 (B).

**Correct choice:** myButton.addEventListener(‘click’, handleClick);

**Why:**  
The standard and modern way to attach an event listener to a DOM element in JavaScript is using `addEventListener()`. It allows multiple listeners for the same event type on a single element. Options 1 and 3 are non-standard methods, and Option 4 (`attachEvent`) is an older, Internet Explorer-specific method.

**Go deeper:**

[Using JavaScript Prototype To Add New Properties](https://www.kirupa.com/html5/using_js_prototype_to_add_new_properties.htm)

**First-answer leaderboard**

1. @emmawalter5 - 11 (firsts) 🏆
2. @kirupa - 8 (firsts)
3. @Apexcodes - 6 (firsts)
4. @adnanahmed - 2 (firsts)

---

_[View the full topic](https://forum.kirupa.com/t/js-quiz-easy-simplest-dom-event-listener/683700)._
