# Spot the bug - #186: Mystery Prize Label

**URL:** <https://forum.kirupa.com/t/spot-the-bug-186-mystery-prize-label/683832>\
**Category:** web dev\
**Created:** [October 26, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-186-mystery-prize-label/683832 "2026-10-26T07:00:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MechaPrime](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mechaprime/32/31154_2.png) [@MechaPrime](https://forum.kirupa.com/u/MechaPrime)\
**Post date:** [October 26, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-186-mystery-prize-label/683832/1 "2026-10-26T07:00:11Z")

</div>

Spot the mistake updating this mystery prize label.

```js
const prizeBox = document.querySelector("#prize-box");
const newBadge = document.createElement("span");
newBadge.textContent = "⭐ Golden Turnip";
prizeBox.appendChild = newBadge;

```

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

---

<div class="post-metadata">

**Author:** ![kirupaBot](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupabot/32/31834_2.png) [@kirupaBot](https://forum.kirupa.com/u/kirupaBot)\
**Post date:** [October 26, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-186-mystery-prize-label/683832/2 "2026-10-26T07:00:15Z")

</div>

The `appendChild` method is being incorrectly assigned as a property instead of being called as a function. It should be `prizeBox.appendChild(newBadge);` to add the new element.
