Optional Chaining (aka Existential Operator, Null Propagation)

Claude Pache claude.pache at gmail.com
Thu Aug 25 15:37:11 UTC 2016

> Le 25 août 2016 à 16:05, Alexander Mekhonoshin <invntrm at yandex-team.ru> a écrit :
> 3. groupped ?.()
> Syntax for the full existential chain case:
> .?(a.b.c) // equals with typeof a !== 'undefined' && a.b && a.b.c

In other words, `.?(a.b.c)` (or whatever other syntax) is approximately equivalent to `a?.b?.c`.

The advantage of such a shortcut should be weighted against the burden of learning yet another syntax. On that subject, I recommend to read:


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160825/d600c165/attachment-0001.html>

More information about the es-discuss mailing list