---
title: "Discussion on \"Switch(true) in js\" | Hashnode"
description: "Discussion on \"Switch(true) in js\". Well i was writing this small code to check some conditions using a switch statement, when i came acoss this mundane JS concept where we use Switch(expression) and then the following cases for it,\nin Java, i remember using switch(variable) which will..."
url: "https://hashnode.com/posts/switchtrue-in-js/667c42e6e3b550805883e188"
---

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

Discussion

# [Switch(true) in js](https://preetisays.hashnode.dev/switchtrue-in-js?utm_source=hashnode&utm_medium=feed)

Well i was writing this small code to check some conditions using a switch statement, when i came acoss this mundane JS concept where we use Switch(expression) and then the following cases for it, in Java, i remember using switch(variable) which will...

Jun 26, 2024 · 1 min read · preetisays.hashnode.dev  
Read the article

-   [#js](https://hashnode.com/tag/js)
-   [#switch-case](https://hashnode.com/tag/switch-case)
-   [#software-development](https://hashnode.com/tag/software-development)

## Written by

[Preeti](https://hashnode.com/@preeticodes)

@preeticodes · Bengaluru

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
