Do we really need a new syntax for this? What is wrong with a simple if statement?
-
-
-
http://deeply.nested.object.property = http://deeply.nested.object.property || "default value"; That's what's wrong.
- 5 more replies
New conversation -
-
-
Now do nullish short circuiting in left hand of assignment
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Wow I missed this. What about ?= operator?
-
null or undefined ??= 'value assigned case match with left side conditions'
End of conversation
New conversation -
-
-
@remindmetweets remind me in eight hours -
Alright! Let's save a screenshot. I will reply again in 8 hours.pic.twitter.com/hsiiCSIX8v
- 1 more reply
New conversation -
-
-
Yessss
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I need more examples. Looks a bit inconsistent idk
-
let x = true, y = false, j = null; x &&= 'Hello, World'; // assign value to x, because x is a truthy value, based on && logical operator. y &&= 'Hello, World'; // don't assign value to y, because y is a falsy value, based on && logical operator.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.