New #JavaScript Feature: Optional Chaining! davidwalsh.name/optional-chain…
@davidwalshblog Why not make it seamless and not require the question mark?
@davidwalshblog I only see benefits in optional chaining. The true is that we are constantly validating object props, and optional chaining makes your life easier for this required task.
@davidwalshblog I think this should be skills?.[language]?
@davidwalshblog Typo on first paragraph. "On" should probably be "One". Cool stuff nonetheless.
@davidwalshblog This is the main thing I've been missing from CoffeeScript
@davidwalshblog Literally just being using the same construct inside Azure Logic Apps. Nifty to have in JS
@davidwalshblog Love that you still name MooTools <3, what a school it was!
@davidwalshblog Like it. For optional data fields or sth like that it's handy 👍
@davidwalshblog It would be ?.[ rather than ?[ In the photo you've attached
@davidwalshblog Now if we can set a defaults when null after the chain: const frameworks = person?.skills?.javascript?.frameworks ?? ["angular"];