---
title: "Discussion on \"So This switch Statement Is Broken... Let’s Fix It\" | Hashnode"
description: "Discussion on \"So This switch Statement Is Broken... Let’s Fix It\". Understanding why \"case age < 18\" failed and the simple solution that fixed it."
url: "https://hashnode.com/posts/so-this-switch-statement-is-broken-lets-fix-it/686c1dea4a7c931f5254fce5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [So This switch Statement Is Broken... Let’s Fix It](https://codejanja.hashnode.dev/so-this-switch-statement-is-broken-lets-fix-it?utm_source=hashnode&utm_medium=feed)

Understanding why "case age < 18" failed and the simple solution that fixed it.

Jul 7, 2025 · 2 min read · codejanja.hashnode.dev  
Read the article

-   [#switchtrue](https://hashnode.com/tag/switchtrue)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)
-   [#frontend-development](https://hashnode.com/tag/frontend-development)
-   [#mdn](https://hashnode.com/tag/mdn)

## Written by

[alphaxard](https://hashnode.com/@alphaxard)

@alphaxard

  
[View profile](https://hashnode.com/@alphaxard)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
