---
title: "Comment by Osinachi Chukwujama  on \"Dump the if-else, use these short-hand techniques instead.\" | Hashnode"
description: "Great tips man. You&#39;re doing well. Though, the lookup table. The final console.log gets executed regardless of the presence of the key in the table."
url: "https://hashnode.com/posts/dump-the-if-else-use-these-short-hand-techniques-instead/5ea5f8830135fc417662fbeb/comment/5ea8c26ee15f06fa46eede81"
---

[Discussion](https://hashnode.com/posts/dump-the-if-else-use-these-short-hand-techniques-instead/5ea5f8830135fc417662fbeb)

Comment [Dump the if-else, use these short-hand techniques instead.](https://hashnode.com/posts/dump-the-if-else-use-these-short-hand-techniques-instead/5ea5f8830135fc417662fbeb)

[Osinachi Chukwujama](https://hashnode.com/@Vicradon)

[Apr 28, 2020](https://hashnode.com/posts/dump-the-if-else-use-these-short-hand-techniques-instead/5ea5f8830135fc417662fbeb/comment/5ea8c26ee15f06fa46eede81)

Great tips man. You're doing well.

Though, the lookup table. The final console.log gets executed regardless of the presence of the key in the table.

[David Ayoola](https://hashnode.com/@david_ayo)

[Apr 29, 2020](https://hashnode.com/posts/dump-the-if-else-use-these-short-hand-techniques-instead/5ea5f8830135fc417662fbeb/comment/5ea8c26ee15f06fa46eede81#reply-5ea95492f068bba9527d967a)

Thanks, Victor, I've updated it to use ternary operators instead 🙏🏽
