---
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 writing programs, we often need the computer to make decisions.\nFor example:\n\nIf it is raining → take an umbrella\n\nIf a student scores above 40 → they pass\n\nIf today is Sunday → take a holiday"
url: "https://hashnode.com/posts/control-flow-in-javascript-if-else-and-switch-explained/69b3eec94e5702eb0dcb03d3"
---

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

Discussion

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

When writing programs, we often need the computer to make decisions. For example: If it is raining → take an umbrella If a student scores above 40 → they pass If today is Sunday → take a holiday

Mar 13 · 4 min read · blog.rohitchornele.online  
Read the article

-   [#chaicode](https://hashnode.com/tag/chaicode)
-   [#chaicohort](https://hashnode.com/tag/chaicohort)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#control-flow](https://hashnode.com/tag/control-flow)
-   [#chai-code](https://hashnode.com/tag/chai-code)

## Written by

[Rohit Chornele](https://hashnode.com/@rohitchornele)

@rohitchornele · Nagpur, India

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

Professional Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
