# Spot the bug - #178: Tag Normalizer

**URL:** <https://forum.kirupa.com/t/spot-the-bug-178-tag-normalizer/683773>\
**Category:** web dev\
**Created:** [October 18, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-178-tag-normalizer/683773 "2026-10-18T07:00:07Z")\
**Posts on this page:** 1\
**Page:** 1

<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 18, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-178-tag-normalizer/683773/1 "2026-10-18T07:00:07Z")

</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.
