---
title: "Comment by Um Zaharradeen on \"How to code like a pro in 2022 and avoid If-Else\" | Hashnode"
description: "I think if &amp; else makes the job more easier and efficient. The other way around is great though, but looks kind of odd to understand"
url: "https://hashnode.com/posts/how-to-code-like-a-pro-in-2022-and-avoid-if-else/62aab3692b2b09182b654c62/comment/62acd75fa10f123c0cf6e464"
---

[Discussion](https://hashnode.com/posts/how-to-code-like-a-pro-in-2022-and-avoid-if-else/62aab3692b2b09182b654c62)

Comment [How to code like a pro in 2022 and avoid If-Else](https://hashnode.com/posts/how-to-code-like-a-pro-in-2022-and-avoid-if-else/62aab3692b2b09182b654c62)

[Um Zaharradeen](https://hashnode.com/@deeni)

[Jun 17, 2022](https://hashnode.com/posts/how-to-code-like-a-pro-in-2022-and-avoid-if-else/62aab3692b2b09182b654c62/comment/62acd75fa10f123c0cf6e464)

I think if & else makes the job more easier and efficient. The other way around is great though, but looks kind of odd to understand

[Thai Tran](https://hashnode.com/@thaitran)

[Jun 17, 2022](https://hashnode.com/posts/how-to-code-like-a-pro-in-2022-and-avoid-if-else/62aab3692b2b09182b654c62/comment/62acd75fa10f123c0cf6e464#reply-62ad10933d2cd8400b1bda20)

In my opinion, it is ok to use If-Else for some simple instances but in a more complicated use case, you should not avoid using it. Especially if you are not the one who writes the code, it will take longer for you to evaluate all conditions to assert the result.

[Um Zaharradeen](https://hashnode.com/@deeni)

[Jun 18, 2022](https://hashnode.com/posts/how-to-code-like-a-pro-in-2022-and-avoid-if-else/62aab3692b2b09182b654c62/comment/62acd75fa10f123c0cf6e464#reply-62ae067ad8afe74aa51fb3c0)

[Thai Tran](https://hashnode.com/@thaitran) Very true, to avoid repetitions until the condition is valid.
