Proposal for a null coalescing operator

Brandon Andrews warcraftthreeft at sbcglobal.net
Mon Aug 17 00:33:21 UTC 2015


https://en.wikipedia.org/wiki/Null_coalescing_operator

Essentially x ?? y will return x when not null or undefined else it will return y.


A nice Javascript explanation of the current problems with using || that can cause unforeseen bugs:

http://stackoverflow.com/a/476445


More information about the es-discuss mailing list