MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/llau8d/javascript_object_merge/gnpnl2f/?context=3
r/learnjavascript • u/beforesemicolon • Feb 16 '21
28 comments sorted by
View all comments
2
What’s the ?? operator?
return a ?? {}
4 u/beforesemicolon Feb 17 '21 Thats the null coalescing operator. It picks the right side value if the left side is either null or undefined.https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator 1 u/192_168_1_x Feb 17 '21 new syntax, cool. TIL thanks. 1 u/[deleted] Feb 17 '21 You're welcome.
4
Thats the null coalescing operator. It picks the right side value if the left side is either null or undefined.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator
1 u/192_168_1_x Feb 17 '21 new syntax, cool. TIL thanks. 1 u/[deleted] Feb 17 '21 You're welcome.
1
new syntax, cool. TIL thanks.
1 u/[deleted] Feb 17 '21 You're welcome.
You're welcome.
2
u/192_168_1_x Feb 17 '21
What’s the ?? operator?