home.social

#optionalchaining — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #optionalchaining, aggregated by home.social.

  1. #TIL #JavaScript #OptionalChaining "short circuits" the rest of the evaluation so you can safely write `a?.b.c()` (no need for `a?.b?.c()`).

    Personally I find it kind of confusing that introducing parens or a variable changes behavior, but I can see the reasoning behind it.

    github.com/tc39/proposal-optio