# Nullish unary operator \`?\`

**URL:** <https://es.discourse.group/t/nullish-unary-operator/657>\
**Category:** 💡 Ideas\
**Tags:** proposal\
**Created:** [February 21, 2021, 3:36pm UTC](https://es.discourse.group/t/nullish-unary-operator/657 "2021-02-21T15:36:16Z")\
**Posts on this page:** 1\
**Showing post:** 55

<div class="post-metadata">

**Author:** ![ethanlal04](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/ethanlal04/32/918_2.png) [@ethanlal04](https://es.discourse.group/u/ethanlal04)\
**Post date:** [August 12, 2023, 9:35am UTC](https://es.discourse.group/t/nullish-unary-operator/657/55 "2023-08-12T09:35:48Z")

</div>

I just remembered this idea now when I came across something similar, so just came in to drop a hi.

I think 'non-nullish' as its name is totally fine, unless you want to coin a new term like fullish, which would be kinda foolish 🤭.

I would oppose the `isNullish()` thing cuz I don like jamming simple operations like these which need simple operators into gross utility functions. Besides, its longer than doing `?a` anyway and if we wanted, we could declare it ourselves.

Also, sheepishly, this is a kinda use case for my [Unions](https://es.discourse.group/t/unions/993) proposal which nobody liked 🥺. But I would still prefer a nullish operator for this all the same.

```javascript
foo !== undefined && foo !== null

foo !== null &~ undefined // TADA

```

I'm very positive for this idea and would love to see this in the language. I just hope it's given the attention it deserves and championed soon :)

---

_[View the full topic](https://es.discourse.group/t/nullish-unary-operator/657)._
