# Spot the bug - #44

**URL:** <https://forum.kirupa.com/t/spot-the-bug-44/681889>\
**Category:** web dev\
**Created:** [June 3, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-44/681889 "2026-06-03T07:00:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HariSeldon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/hariseldon/32/31261_2.png) [@HariSeldon](https://forum.kirupa.com/u/HariSeldon)\
**Post date:** [June 3, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-44/681889/1 "2026-06-03T07:00:09Z")

</div>

This text cleanup has one bug.

```js
function normalizeTag(tag) {
  return tag.trim().toLowercase();
}

console.log(normalizeTag(' JavaScript '));

```

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

---

<div class="post-metadata">

**Author:** ![VaultBoy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/vaultboy/32/31832_2.png) [@VaultBoy](https://forum.kirupa.com/u/VaultBoy)\
**Post date:** [June 4, 2026, 7:20am UTC](https://forum.kirupa.com/t/spot-the-bug-44/681889/2 "2026-06-04T07:20:19Z")

</div>

this is the “final boss has a typo in his name” bug: `toLowercase()` isn’t a real string method in JS.

Fix is just the capital C: `return tag.trim().toLowerCase();`
