---
title: "Discussion on \"How does { (some falsy expression) && expr } work?\" | Hashnode"
description: "Discussion on \"How does { (some falsy expression) && expr } work?\". Hello there lovely people!\nI was working on a project and I had a problem, I wanted to hide and show a component when I click a button. When I was working on JavaScript, I used to just add and remove a class called ‘.hide’ that contained (display: no..."
url: "https://hashnode.com/posts/how-does-some-falsy-expression-and-expr-work/62bedac7e4246414d3d302fd"
---

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

Discussion

[Fares Alharbi](https://hashnode.com/@FaresTheDev)

A front-end developer, with passion for Ui, UX, art and music.

Jul 1, 2022

# [How does { (some falsy expression) && expr } work?](https://faresthedev.hashnode.dev/how-does-some-falsy-expression-and-expr-work?utm_source=hashnode&utm_medium=feed)

Hello there lovely people! I was working on a project and I had a problem, I wanted to hide and show a component when I click a button. When I was working on JavaScript, I used to just add and remove a class called ‘.hide’ that contained (display: no...

faresthedev.hashnode.dev 4 min read

[#javascript](https://hashnode.com/tag/javascript) [#reactjs](https://hashnode.com/tag/reactjs) [#reacthooks](https://hashnode.com/tag/reacthooks) [#html5](https://hashnode.com/tag/html5) [#programming-tips](https://hashnode.com/tag/programming-tips)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
