---
title: "Discussion on \"Control Flow in JavaScript: If, Else, and Switch\" | Hashnode"
description: "Discussion on \"Control Flow in JavaScript: If, Else, and Switch\". 1. The if Statement\nThe if statement is the simplest way to make a decision in code. It basically says, \"Check if this condition is true. If it is, run the code inside the block.\"\nlet age = 20;\n\nif (a"
url: "https://hashnode.com/posts/control-flow-in-javascript-if-else-and-switch/699f433bc9015c37f6b01781"
---

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

Discussion

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

1\. The if Statement The if statement is the simplest way to make a decision in code. It basically says, "Check if this condition is true. If it is, run the code inside the block." let age = 20; if (a

Feb 25 · 3 min read · jacked.dev  
Read the article

-   [#chaicode](https://hashnode.com/tag/chaicode)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Chirag Bhugra](https://hashnode.com/@Chiragbhugra)

@Chiragbhugra

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
