---
title: "Discussion on \"Nesting \"If-else statements\" Is Bad. Do this instead.\" | Hashnode"
description: "Discussion on \"Nesting \"If-else statements\" Is Bad. Do this instead.\". If-else statements are a way to check for a particular conditions or values before executing a piece of code, function or reassigning a particular variable. However, nested \"if-else statements\" can easily become very difficult to read and painful to ..."
url: "https://hashnode.com/posts/nesting-if-else-statements-is-bad-do-this-instead/6276bc0adc122f5a4f21e822"
---

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

Discussion

# [Nesting "If-else statements" Is Bad. Do this instead.](https://blog.bonarhyme.com/nesting-if-else-statements-is-bad-do-this-instead?utm_source=hashnode&utm_medium=feed)

If-else statements are a way to check for a particular conditions or values before executing a piece of code, function or reassigning a particular variable. However, nested "if-else statements" can easily become very difficult to read and painful to ...

May 7, 2022 · 2 min read · blog.bonarhyme.com  
Read the article

-   [#thw-web-apps](https://hashnode.com/tag/thw-web-apps)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Bonaventure Chukwudi](https://hashnode.com/@Bonarhyme)

@Bonarhyme · Anambra, Nigeria

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

Full-stack developer

I am a developer from Nigeria.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
