alongubkin / alongubkin/spider
Null coalescing operator
Open
enhancement
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
I have a couple of points about the null coalescing operator, `??`.
Firstly, why isn't it still `||` like vanilla JS and the rest of the programming languages[1]?
Changing it just for the sake of change just introduces confusion is not an improvement, IMHO.
Secondly, the ruby-esque `||=` operator would be amazing.
```
a ||= b
```
becomes
```
a = a || b
```
_(this can be `??=` if you're quite set on keeping the `??`)_
[1] Except the unruly PHP
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.