Check out Optional Chaining in JavaScript! davidwalsh.name/optional-chain…
5
10
58
0
5
Download Image
@davidwalshblog The best is with functions: a?.map?.(...)?.()
@davidwalshblog TIL you can use `?.` with `[x]` and function calls! The destructuring example throws an error if `skills` is missing. You can use `??` to avoid that.
@davidwalshblog And then you forgot to add ?? to this chain. 🤣🤣🤣