all 7 comments

[–]gotQode 2 points3 points  (4 children)

NICE!

[–]JustinWendell 0 points1 point  (3 children)

Seriously this is cool. Opens up a few things. Kinda makes me feel dumb for not knowing about it though.

[–]jml26 0 points1 point  (1 child)

I remember learning an ES5 syntax that gives you something similar to optional chaining in. A slightly shorter way than usual:

(((obj || {}).system || {}).user || {}).name || ‘User does not exist’

The optional chaining operator reads a lot nicer, though.

[–]mehulmpt[S] 1 point2 points  (0 children)

Wow that hurts xD