---
title: "Discussion on \"Switch Case vs If-else Statement (Which is optimized)\" | Hashnode"
description: "Discussion on \"Switch Case vs If-else Statement (Which is optimized)\". Alright, I came up with a new topic, the Switch case vs if-else statement which is a more optimized way to write the code. In my opinion, we can't compare that two features every time because both have a little bit different workflow.\nLike switch, th..."
url: "https://hashnode.com/posts/switch-case-vs-if-else-statement-which-is-optimized/63fc789effd4305561d9872d"
---

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

Discussion

# [Switch Case vs If-else Statement (Which is optimized)](https://madhu003.hashnode.dev/switch-case-vs-if-else-statement-which-is-optimized?utm_source=hashnode&utm_medium=feed)

Alright, I came up with a new topic, the Switch case vs if-else statement which is a more optimized way to write the code. In my opinion, we can't compare that two features every time because both have a little bit different workflow. Like switch, th...

Feb 27, 2023 · 3 min read · madhu003.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#if-else](https://hashnode.com/tag/if-else)
-   [#switch-case](https://hashnode.com/tag/switch-case)
-   [#learn-coding](https://hashnode.com/tag/learn-coding)

## Written by

[Madhu Soodan](https://hashnode.com/@madhu003)

@madhu003 · Jaipur, Rajasthan, IN

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

Associate Staff Engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
