# Spot the bug - #81

**URL:** <https://forum.kirupa.com/t/spot-the-bug-81/682526>\
**Category:** web dev\
**Created:** [July 9, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-81/682526 "2026-07-09T07:00:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quelly](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/quelly/32/31386_2.png) [@Quelly](https://forum.kirupa.com/u/Quelly)\
**Post date:** [July 9, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-81/682526/1 "2026-07-09T07:00:08Z")

</div>

Quick one: event handling bug here.

```js
const button = document.querySelector('#save');
button.addEventListener('click', saveForm());

function saveForm() {
  console.log('saved');
}

```

Reply with what is broken and how you would fix it.

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [July 9, 2026, 12:16pm UTC](https://forum.kirupa.com/t/spot-the-bug-81/682526/2 "2026-07-09T12:16:29Z")

</div>

The function name in the addEventListener call shouldn’t have the ( and ) characters in it.
