---
title: "Discussion on \"Control Flow in JavaScript: If, Else, and Switch Explained\" | Hashnode"
description: "Discussion on \"Control Flow in JavaScript: If, Else, and Switch Explained\". When I first started learning JavaScript, one question kept coming to my mind: how does a program decide what code should run?\nA program doesn’t run everything blindly. It checks conditions and then d"
url: "https://hashnode.com/posts/control-flow-in-javascript-if-else-and-switch-explained/69b4cfb7210c74252fa9a628"
---

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

Discussion

# [Control Flow in JavaScript: If, Else, and Switch Explained](https://all-about-javascript.hashnode.dev/control-flow-in-javascript-if-else-and-switch-explained?utm_source=hashnode&utm_medium=feed)

When I first started learning JavaScript, one question kept coming to my mind: how does a program decide what code should run? A program doesn’t run everything blindly. It checks conditions and then d

Mar 14 · 4 min read · all-about-javascript.hashnode.dev  
Read the article

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

## Written by

[Abdulla Mulla](https://hashnode.com/@abdulla210)

@abdulla210

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
