---
title: "Discussion on \"A Comprehensive Guide on the use of If-Else Statement in JavaScript\" | Hashnode"
description: "Discussion on \"A Comprehensive Guide on the use of If-Else Statement in JavaScript\". Introduction\nIf-else statement is a block of code that is executed when a particular condition is met. It is used to perform different actions based on different conditions, such that if a particular condition is true, a certain code should be execut..."
url: "https://hashnode.com/posts/a-comprehensive-guide-on-the-use-of-if-else-statement-in-javascript/6443825bc2b756fab39e1314"
---

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

Discussion

# [A Comprehensive Guide on the use of If-Else Statement in JavaScript](https://ghloriey.hashnode.dev/a-comprehensive-guide-on-the-use-of-if-else-statement-in-javascript?utm_source=hashnode&utm_medium=feed)

Introduction If-else statement is a block of code that is executed when a particular condition is met. It is used to perform different actions based on different conditions, such that if a particular condition is true, a certain code should be execut...

Apr 22, 2023 · 6 min read · ghloriey.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#beginner](https://hashnode.com/tag/beginner)

## Written by

[Glory Ekpe](https://hashnode.com/@Ghloriey)

@Ghloriey

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

Consulting Technical Writer/Editor experienced in writing technical specifications, contracts, reports, proposals.

## Responses 2

Markdown supported · ⌘↵ to post

[The ERIN](https://hashnode.com/@OnlyOneErin)

[Apr 22, 2023](https://hashnode.com/posts/a-comprehensive-guide-on-the-use-of-if-else-statement-in-javascript/6443825bc2b756fab39e1314/comment/6444556aea9c083a86dcc195)

Thanks for sharing

[Okafor Peace Ngozi](https://hashnode.com/@ladyprowess)

[Apr 22, 2023](https://hashnode.com/posts/a-comprehensive-guide-on-the-use-of-if-else-statement-in-javascript/6443825bc2b756fab39e1314/comment/644398021ffcf72b6e731b6d)

Nice read 🚀
