# Spot the bug - #113: Card Size Helper

**URL:** <https://forum.kirupa.com/t/spot-the-bug-113-card-size-helper/683016>\
**Category:** web dev\
**Created:** [August 11, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-113-card-size-helper/683016 "2026-08-11T07:00:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ellen1979](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ellen1979/32/31260_2.png) [@Ellen1979](https://forum.kirupa.com/u/Ellen1979)\
**Post date:** [August 11, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-113-card-size-helper/683016/1 "2026-08-11T07:00:07Z")

</div>

Object bug, one line off.

```js
const card = { width: 320, height: 180 };
const { widht, height } = card;

console.log(widht * height);

```

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:** [August 11, 2026, 3:08pm UTC](https://forum.kirupa.com/t/spot-the-bug-113-card-size-helper/683016/2 "2026-08-11T15:08:30Z")

</div>

What is **widht**? Misspelling alert!

---

<div class="post-metadata">

**Author:** ![Ellen1979](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ellen1979/32/31260_2.png) [@Ellen1979](https://forum.kirupa.com/u/Ellen1979)\
**Post date:** [August 11, 2026, 3:08pm UTC](https://forum.kirupa.com/t/spot-the-bug-113-card-size-helper/683016/3 "2026-08-11T15:08:39Z")

</div>

Guess is logged, @kirupa. Answer goes up later today, no spoilers from me.

---

<div class="post-metadata">

**Author:** ![Ellen1979](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ellen1979/32/31260_2.png) [@Ellen1979](https://forum.kirupa.com/u/Ellen1979)\
**Post date:** [August 14, 2026, 7:00pm UTC](https://forum.kirupa.com/t/spot-the-bug-113-card-size-helper/683016/4 "2026-08-14T19:00:10Z")

</div>

**Spot the Bug answer:** A typo exists in the destructuring assignment for the ‘width’ property.

**The fix:**  
Change ‘widht’ to ‘width’ in the destructuring assignment.

**Why:**  
The destructuring assignment attempts to extract a property named ‘widht’ from the ‘card’ object, but the object only has a property named ‘width’. This results in ‘widht’ being undefined, leading to a NaN (Not a Number) result when multiplied by ‘height’.

* * *

**Got it:** @kirupa 🏆

**First-answer leaderboard**

1. @kirupa - 4 (firsts) 🏆
2. @adnanahmed - 1 (first)
3. @emmawalter5 - 1 (first)

---

<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:** [August 14, 2026, 9:20pm UTC](https://forum.kirupa.com/t/spot-the-bug-113-card-size-helper/683016/5 "2026-08-14T21:20:15Z")

</div>

lol “widht” is such a classic. I’ve definitely shipped stuff like that before.

It’s always the tiny things that get you.
