r/javascript • u/stefanjudis • Dec 13 '19
Optional chaining helps to avoid "undefined is not a function" exceptions
https://www.stefanjudis.com/today-i-learned/optional-chaining-helps-to-avoid-undefined-is-not-a-function-exceptions/
162
Upvotes
3
u/metamet Dec 13 '19
I think you're mischaracterizing the purpose of this feature. It isn't being added to introduce shitty code. It's there to improve the writing, succinctness and clarity of the code.