---
title: "Discussion on \"Conditionally assign value in JavaScript...\nand more\" | Hashnode"
description: "Discussion on \"Conditionally assign value in JavaScript...\nand more\". This is the situation that you can never avoid as a developer. Assigning value to a variable based on a condition.\nSo in this article, we will have a look at different approaches you can take for doing this trivial looking task(Trust me sometimes it ..."
url: "https://hashnode.com/posts/conditionally-assign-value-in-javascript-and-more/6083e34cff5fc65284a796ca"
---

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

Discussion

# [Conditionally assign value in JavaScript... and more](https://blog.praveeen.in/conditionally-assign-value-in-javascript-and-more?utm_source=hashnode&utm_medium=feed)

This is the situation that you can never avoid as a developer. Assigning value to a variable based on a condition. So in this article, we will have a look at different approaches you can take for doing this trivial looking task(Trust me sometimes it ...

Apr 24, 2021 · 3 min read · blog.praveeen.in  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#programming-languages](https://hashnode.com/tag/programming-languages)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)
-   [#productivity](https://hashnode.com/tag/productivity)
-   [#cheatsheet](https://hashnode.com/tag/cheatsheet)

## Written by

[Praveen Kumar](https://hashnode.com/@praveeen)

@praveeen · India

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

Full Stack web developer and JavaScript enthusiast

I am a full stack web developer currently pursuing a degree in computer science. I have been working on the web for the past 4-5 years. I love to help others in learning new awesome stuff easily.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
